Unix Technical Forum

Re: [PERFORM] Posible planner improvement?

This is a discussion on Re: [PERFORM] Posible planner improvement? within the pgsql Hackers forums, part of the PostgreSQL category; --> Decibel! wrote: >For reference, the original query as posted to -performance: >select * from t1, t2 where t1.id > ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Hackers

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 05-29-2008, 09:42 AM
Stephen R. van den Berg
 
Posts: n/a
Default Re: [PERFORM] Posible planner improvement?

Decibel! wrote:
>For reference, the original query as posted to -performance:


>select * from t1, t2 where t1.id > 158507 and t1.id = t2.id;


>That took > 84 minutes (the query was a bit longer but this is the
>part that made the difference) after a little change the query took
>~1 second:


Just out of curiosity, would predefining the order of join have solved
the issue, as in:

a. select * from t1 join t2 using(id) where t1.id > 158507;
vs.
b. select * from t2 join t1 using(id) where t1.id > 158507;

I'd expect a to be faster than b, is it?
--
Sincerely, srb@cuci.nl
Stephen R. van den Berg.
"Technology is stuff that doesn't work yet." -- Bran Ferren
"We no longer think of chairs as technology." -- Douglas Adams

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 04:54 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com