Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Performance > =?WINDOWS-1252?...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 8 Topic 4060 of 4184
Post > Topic >>

=?WINDOWS-1252?Q?Query_Optimization_with_Kruskal=92s_Algorithm?=

by tarcizioab@[EMAIL PROTECTED] ("Tarcizio Bini") May 7, 2008 at 01:28 PM

------=_Part_2522_19068819.1210177684648
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Hello friends,

I'm working on optimizing queries using the Kruskal algorithm (
http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=4318118).
I did
several
tests in the database itself and saw interesting results.
I did 10 executions with each query using unchanged source of Postgres and
then adapted to the algorithm of Kruskal.
The query I used is composed of 12 tables and 11 joins.

Results Postgresql unchanged (ms): (\ timing)

170,690
168,214
182,832
166,172
174,466
167,143
167,287
172,891
170,452
165,665
average=> 170,5812 ms


Results of Postgresql with the Kruskal algorithm (ms): (\ timing)

520,590
13,533
8,410
5,162
5,543
4,999
9,871
4,984
5,010
8,883
average=> 58,6985 ms


As you can see the result, using the Kruskal algorithm, the first query
takes more time to return results. This does not occur when using the
original source of Postgres.
So how is the best method to conduct the tests? I take into consideration
the average of 10 executions or just the first one?
Do you think I must clean the cache after each query? (because the other
(9)
executions may have information in memory).

regards, Tarcizio Bini.

------=_Part_2522_19068819.1210177684648
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Hello friends,<br><br>I&#39;m working on optimizing queries using the
Kruskal algorithm (<a
href="http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=4318118">http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=4318118</a>).
I did several tests in the database itself and saw interesting results.<br>
I did 10 executions with each query using unchanged source of Postgres and
then adapted to the algorithm of Kruskal.<br>The query I used is composed
of 12 tables and 11 joins. <br><br>Results Postgresql unchanged (ms): (\
timing)<br>
<br>170,690<br>168,214<br>182,832<br>166,172<br>174,466<br>167,143<br>167,287<br>172,891<br>170,452<br>165,665<br>average=&gt;
170,5812 ms<br><br><br>Results of Postgresql with the Kruskal algorithm
(ms): (\ timing)<br><br>
520,590<br>13,533<br>8,410<br>5,162<br>5,543<br>4,999<br>9,871<br>4,984<br>5,010<br>8,883<br>average=&gt;
58,6985 ms<br><br><br>As you can see the result, using the Kruskal
algorithm, the first query takes more time to return results. This does
not occur when using the original source of Postgres.<br>
So how is the best method to conduct the tests? I take into consideration
the average of 10 executions or just the first one?<br>Do you think I must
clean the cache after each query? (because the other (9) executions may
have information in memory).<br>
<br>regards, Tarcizio Bini.<br>

------=_Part_2522_19068819.1210177684648--
 




 8 Posts in Topic:
=?WINDOWS-1252?Q?Query_Optimization_with_Kruskal=92s_Algorithm?=
tarcizioab@[EMAIL PROTECT  2008-05-07 13:28:04 
=?UTF-8?Q?Re:__Query_Optimiza?= =?UTF-8?Q?tion_with_Kruskal=E2=8
alex@[EMAIL PROTECTED] (  2008-05-07 22:09:30 
=?windows-1252?Q?Re=3A_Query_Optimization_with_Kruskal=92s_Algor
Rauan Maemirov <rauan1  2008-05-10 10:31:22 
=?WINDOWS-1252?Q?Re:__Re:_Query_Optimization_with_Krusk?=
grzm@[EMAIL PROTECTED] (  2008-05-10 14:26:51 
=?WINDOWS-1252?Q?Re:__Re:_Query_Optimi?= =?WINDOWS-1252?Q?zation
jonah.harris@[EMAIL PROTE  2008-05-10 16:27:12 
Re: =?WINDOWS-1252?Q?Re:__Re:_Query_Optimi?= =?WINDOWS-1252?Q?za
tgl@[EMAIL PROTECTED] (T  2008-05-10 17:12:22 
=?WINDOWS-1252?Q?Re:_Re:__Re:_Query_Opti?= =?WINDOWS-1252?Q?miza
jonah.harris@[EMAIL PROTE  2008-05-10 17:17:21 
Re: =?WINDOWS-1252?Q?Re:_Re:__Re:_Query_Opti?= =?WINDOWS-1252?Q?
tgl@[EMAIL PROTECTED] (T  2008-05-10 20:30:39 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan13V112 Thu Jul 24 6:53:49 CDT 2008.