| From: | Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au> |
|---|---|
| To: | Jacques Caron <jc(at)directinfos(dot)com> |
| Cc: | pgsql-performance(at)postgresql(dot)org |
| Subject: | Re: Use of data within indexes |
| Date: | 2005-04-14 14:04:24 |
| Message-ID: | 425E7868.6080807@familyhealth.com.au |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-performance |
> To be more explicit, let's say I have table with two fields a and b. If
> I have an index on (a,b) and I do a request like "SELECT b FROM table
> WHERE a=x", will Postgresql use only the index, or will it need to also
> read the table page for that (those) row(s)?
It must read the table because of visibility considerations.
> There might be a reason why this is not possible (I don't know if the
> indexes have all necessary transaction ID information?) but otherwise
> this could possibly provide an interesting performance gain for some
> operations, in particular with some types of joins. Or maybe it already
> does it.
It's already been thought of :)
The 4 or so columns that store visibility information are not in the
indexes, to do so would require a significant write cost.
Chris
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Christopher Kings-Lynne | 2005-04-14 14:07:39 | Re: Foreign key slows down copy/insert |
| Previous Message | Joel Fradkin | 2005-04-14 13:52:21 | Re: speed of querry? |