Re: Optimisation deficiency: currval('seq')-->seq scan, constant-->index scan - Mailing list pgsql-hackers

From Tiago Antão
Subject Re: Optimisation deficiency: currval('seq')-->seq scan, constant-->index scan
Date
Msg-id Pine.LNX.4.21.0008211252300.24628-100000@eros.si.fct.unl.pt
Whole thread Raw
In response to Re: Optimisation deficiency: currval('seq')-->seq scan, constant-->index scan  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Optimisation deficiency: currval('seq')-->seq scan, constant-->index scan
List 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
somethingthat 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



pgsql-hackers by date:

Previous
From: Zeugswetter Andreas SB
Date:
Subject: AW: pg_attribute growing and growing and growing
Next
From: Tiago Antão
Date:
Subject: Re: Optimisation deficiency: currval('seq')-->seq scan, constant-->index scan