<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Latest posts for the topic "Performance of _X_Factory.List_X_ByQuery in .NET with PostgresQL"]]></title>
		<link>http://forums.visual-paradigm.com/posts/32.html</link>
		<description><![CDATA[Latest messages posted in the topic "Performance of _X_Factory.List_X_ByQuery in .NET with PostgresQL"]]></description>
		<generator>JForum - http://www.jforum.net</generator>
			<item>
				<title>Performance of _X_Factory.List_X_ByQuery in .NET with PostgresQL</title>
				<description><![CDATA[ I set up a simple db with one table with only a primary, unique key index using ERD in DB-VA. Using .NET 2.0 and PostgresQL 8.2, I try to insert 1,000,000 records into the table. After 10000 entries, my rate is about 20 inserts per second. This seems extremely slow.<br> <br> The duration of these events in the PostgresQL log file is 0.000 msec for each event. For each second, there are roughly 20-21 transaction sets (SELECT, SET TRANSACTION ... COMMITTED, INSERT, COMMIT), which confirms my measurements.<br> <br> A manual query into the db using psql for ALL RECORDS (SELECT * from dummy) takes 16 msec, which would be 60 entries per second. And this is to retrieve the entire list of 10,000 entries!<br> <br> Can someone help me? Is the .NET PostgresQL driver really this slow? Or is this a limitation of DB-VA?<br> <br> I'll post more as I find more..<br> <br> Thanks,<br> -bdubs<br> <br> <br>  <table class="code-table-simple" align="center">
		<tr> 
		<td><span class="genmed"><b>Code:</b></span></td>
		</tr>
		</table>
		<table class="code-table" align="center">
		<tr>
		<td class="code">
		<pre>                 System.Diagnostics.Stopwatch sw = new System.Diagnostics.Stopwatch&#40;&#41;;
                 sw.Start&#40;&#41;;
                 while &#40;i &lt; 1000000&#41;
                 {
                     Dummy&#91;&#93; dummy_list = DummyFactory.ListDummyByQuery&#40;"id=" + i, null&#41;;
                     if &#40;dummy_list == null || dummy_list.Length == 0&#41;
                     {
                         Dummy dummy = DummyFactory.CreateDummy&#40;&#41;;
                         dummy.Id = i;
                         dummy.Save&#40;&#41;;
                     }
 
                     if &#40;i % 100 == 0&#41;
                     {
                         sw.Stop&#40;&#41;;
                         System.Diagnostics.Trace.WriteLine&#40;string.Format&#40;"&#40;dummy&#41; Items per Second, count: {0:0.000}, {1}",
                             100.0f * &#40;1000.0f / sw.ElapsedMilliseconds&#41;,
                             i&#41;&#41;;
                         sw.Reset&#40;&#41;;
                         sw.Start&#40;&#41;;
                     }
                     i++;
                 } </pre></td>
		</tr>
		</table> ]]></description>
				<guid isPermaLink="true">http://forums.visual-paradigm.com/posts/1861#8984.html</guid>
				<link>http://forums.visual-paradigm.com/posts/1861#8984.html</link>
				<pubDate><![CDATA[Thu, 11 Jan 2007 13:55:40]]></pubDate>
				<author><![CDATA[ bdubs]]></author>
			</item>
			<item>
				<title>Re:Performance of _X_Factory.List_X_ByQuery in .NET with PostgresQL</title>
				<description><![CDATA[ Hi bdubs,<br> <br> Thank you for your post. I have forwarded your question to our engineers. I will come back to you as soon as possible.<br> <br> Best regards,<br> Jick]]></description>
				<guid isPermaLink="true">http://forums.visual-paradigm.com/posts/1861#8992.html</guid>
				<link>http://forums.visual-paradigm.com/posts/1861#8992.html</link>
				<pubDate><![CDATA[Thu, 11 Jan 2007 14:50:13]]></pubDate>
				<author><![CDATA[ Jick]]></author>
			</item>
			<item>
				<title>Re:Performance of _X_Factory.List_X_ByQuery in .NET with PostgresQL</title>
				<description><![CDATA[ Hi bdubs,<br> <br> Please use session.Evict() to release object in session. See if it helps.<br> <br> Best regards,<br> Jick]]></description>
				<guid isPermaLink="true">http://forums.visual-paradigm.com/posts/1861#15719.html</guid>
				<link>http://forums.visual-paradigm.com/posts/1861#15719.html</link>
				<pubDate><![CDATA[Fri, 2 Feb 2007 16:19:34]]></pubDate>
				<author><![CDATA[ Jick]]></author>
			</item>
	</channel>
</rss>