Getting rid of cheap-startup-cost paths earlier

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-hackers(at)postgreSQL(dot)org
Subject: Getting rid of cheap-startup-cost paths earlier
Date: 2012-05-22 05:50:13
Message-ID: 19798.1337665813@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Currently, the planner keeps paths that appear to win on the grounds of
either cheapest startup cost or cheapest total cost. It suddenly struck
me that in many simple cases (viz, those with no LIMIT, EXISTS, cursor
fast-start preference, etc) we could know a-priori that cheapest startup
cost is not going to be interesting, and hence immediately discard any
path that doesn't win on total cost.

This would require some additional logic to detect whether the case
applies, as well as extra complexity in add_path. So it's possible
that it wouldn't be worthwhile overall. Still, it seems like it might
be a useful idea to investigate.

Thoughts?

regards, tom lane

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tatsuo Ishii 2012-05-22 07:50:29 Re: Patch: add conversion from pg_wchar to multibyte
Previous Message Tom Lane 2012-05-22 05:44:13 Re: Strange query planner behavior