RE : RE : [PERFORM] Increase performance of a UNION query that thakes 655.07 msec to be runned ?

2004-02-07 Thread Bruno BAGUETTE
On Fri, 6 Feb 2004, Bruno BAGUETTE wrote: In addition to what Tom said, the row estimates look suspiciously default. You mention vacuuming, but do you ever analyze the tables? I run VACUUM FULL ANALYZE with the postgres user on all the PostgreSQL databases on the server,

Re: [PERFORM] Increase performance of a UNION query that thakes 655.07 msec to be runned ?

2004-02-06 Thread Tom Lane
Bruno BAGUETTE [EMAIL PROTECTED] writes: Do you see a way to get better performances with this query which takes currently 655.07 msec to be done. levure= explain analyze SELECT distinct lower(substr(l_name, 1, 1)) AS initiale FROM people levure- UNION levure- SELECT distinct

RE : [PERFORM] Increase performance of a UNION query that thakes 655.07 msec to be runned ?

2004-02-06 Thread Bruno BAGUETTE
re-Hello, As suggested by Tom, I've removed the distinct and tried it's query : levure= explain analyze select initiale from ( levure( select lower(substr(l_name,1,1)) as initiale from people levure( union all levure( select lower(substr(org_name,1,1)) as initiale from organizations

RE : [PERFORM] Increase performance of a UNION query that thakes 655.07 msec to be runned ?

2004-02-06 Thread Bruno BAGUETTE
In addition to what Tom said, the row estimates look suspiciously default. You mention vacuuming, but do you ever analyze the tables? I run VACUUM FULL ANALYZE with the postgres user on all the PostgreSQL databases on the server, twice a day, sometimes more. Also, what do you have sort_mem