Re: Optimisation deficiency: currval('seq')-->seq scan, constant-->index scan

From: Tiago Antão <tra(at)fct(dot)unl(dot)pt>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Optimisation deficiency: currval('seq')-->seq scan, constant-->index scan
Date: 2000-08-21 12:18:38
Message-ID: Pine.LNX.4.21.0008211252300.24628-100000@eros.si.fct.unl.pt
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi!

On Sun, 20 Aug 2000, Tom Lane wrote:

> Cool! Please keep us posted on what you're doing or thinking about
> doing, so that there's not duplicate or wasted effort.

I'm starting to look at pg code, so some comments that follow can be
completly dumb or useless :-).
One thing it might be interesting (please tell me if you think
otherwise) would be to improve pg with better statistical information, by
using, for example, histograms. With this probably better estimations
could be done. I think I'd like to do this (I've not looked the code
thoughly at this stage, so it could be really a bad idea...)...
BTW, I'm open to suggestions, if you think there is something that would
be good to be on the pg optimizer, please tell me.

I'd like also to comment on a matter that is on
http://www.postgresql.org/docs/pgsql/doc/TODO.detail/optimizer, regarding
vacuum and analyze beeing together: I think it is a good idea for them to
be together because if there is no vacuum then optimizer should also model
the "clusterization" of tables, a seqscan on a highly unclustered table
could be very expensive. There is a good article regarding this:
http://www.db2mag.com/summer00/programmer.shtml section "use the index any
way that works best or use it the normal way?"

Best regards,
Tiago

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tiago Antão 2000-08-21 12:34:49 Re: Optimisation deficiency: currval('seq')-->seq scan, constant-->index scan
Previous Message Zeugswetter Andreas SB 2000-08-21 09:28:03 AW: pg_attribute growing and growing and growing