| From: | Hannu Krosing <hannu(at)tm(dot)ee> |
|---|---|
| To: | Greg Stark <gsstark(at)mit(dot)edu> |
| Cc: | "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: How to get started hacking on pgsql |
| Date: | 2003-12-04 21:10:43 |
| Message-ID: | 1070572243.3543.9.camel@fuji.krosing.net |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hannu Krosing kirjutas N, 04.12.2003 kell 23:01:
>
> > Where should I be looking in the code?
>
> Try to find where the modified query is tested for. It's probably be
> inside the optimizer, as index scan + no sort is not always faster than
> seq scan + sort, as shown by the same query after vacuum analyze (on an
> empty table)
OTOH, it may be that all combinations of sort and index and where are
not watched in the optimiser proper at all (too compliaced and/or too
costly), but a keyhole optimiser is run over its resulting "best" plan
to remove redundant sorts (but it misses combinations of sort and where
like the one in your example)
---------------
Hannu
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Vivek Khera | 2003-12-04 21:20:22 | Re: autovacuum daemon stops doing work after about an hour |
| Previous Message | scott.marlowe | 2003-12-04 21:10:41 | Re: tuning questions |