Re: [HACKERS] GEQO optimizer (was Re: Backend message type 0x44 arrived while idle) - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] GEQO optimizer (was Re: Backend message type 0x44 arrived while idle)
Date
Msg-id 9313.926952591@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] GEQO optimizer (was Re: Backend message type 0x44 arrived while idle)  (Oleg Bartunov <oleg@sai.msu.su>)
List pgsql-hackers
Oleg Bartunov <oleg@sai.msu.su> writes:
> I found the problem. I modified my test script to add 'vacuum analyze'
> after creating test data and it works really fast ! Great !
> Now I'm wondering why do I need vacuum analyze after creating test data
> and indices ?

VACUUM ANALYZE would create pg_statistics entries for the tables,
which'd allow the optimizer to make better estimates of restriction
and join selectivities.  I expect that it changes the plan being used;
what does EXPLAIN say with and without the analyze?
        regards, tom lane


pgsql-hackers by date:

Previous
From: Oleg Bartunov
Date:
Subject: Re: [HACKERS] GEQO optimizer (was Re: Backend message type 0x44 arrived while idle)
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] GEQO optimizer (was Re: Backend message type 0x44 arrived while idle)