Re: [GENERAL] [ADMIN] OUTER JOIN IS SLOW

2007-01-02 Thread Alban Hertroys
Benjamin Arai wrote: > Just to make things more clear I ran EXPLAIN ANALYZE on the slow query. > I got > -> Index Scan using mutualfd_weekday_qbid_pkey_idx on > mutualfd_weekday_qbid (cost=0.00..6.01 rows=1 width=19) (actual > time=34.579..8510.801 rows=253 loops=1) > Index Cond: ((pk

Re: [GENERAL] [ADMIN] OUTER JOIN IS SLOW

2006-12-23 Thread Benjamin Arai
Hi, I did a vacuum with -z and it fixed the issue. I was not aware that vacuumdb didn't ANALYZE by default.Thanks everybody for all of the help! Benjamin Tom Lane wrote: > Benjamin Arai <[EMAIL PROTECTED]> writes: > >>-> Index Scan using mutualfd_weekday_qbid_pkey_idx on >> mutualf

Re: [GENERAL] [ADMIN] OUTER JOIN IS SLOW

2006-12-23 Thread Tom Lane
Benjamin Arai <[EMAIL PROTECTED]> writes: >-> Index Scan using mutualfd_weekday_qbid_pkey_idx on > mutualfd_weekday_qbid (cost=0.00..6.01 rows=1 width=19) (actual > time=34.579..8510.801 rows=253 loops=1) > Index Cond: ((pkey >= '2005-12-15'::date) AND (pkey <= > '2006-12-15'::dat

Re: [GENERAL] [ADMIN] OUTER JOIN IS SLOW

2006-12-23 Thread Jeff Frost
On Sat, 23 Dec 2006, Benjamin Arai wrote: "-> Index Scan using mutualfd_weekday_qbid_pkey_idx on mutualfd_weekday_qbid (cost=0.00..6.01 rows=1 width=19) (actual time=34.579..8510.801 rows=253 loops=1)" You're right that this is the problem and show that the planner was expecting a very low

Re: [GENERAL] [ADMIN] OUTER JOIN IS SLOW

2006-12-23 Thread Shoaib Mir
Yes, ANALYZE should definitely improve the performance for query... -- Shoaib Mir EnterpriseDB (www.enterprisedb.com) On 12/24/06, Benjamin Arai <[EMAIL PROTECTED]> wrote: Just to make things more clear I ran EXPLAIN ANALYZE on the slow query. I got Merge Full Join (cost=62.33..7

Re: [GENERAL] [ADMIN] OUTER JOIN IS SLOW

2006-12-23 Thread Benjamin Arai
Just to make things more clear I ran EXPLAIN ANALYZE on the slow query. I got Merge Full Join (cost=62.33..73.36 rows=1000 width=19) (actual time=39.205..8521.644 rows=272 loops=1) Merge Cond: ("outer".pkey = "inner".d1) -> Index Scan using mutualfd_weekday_qbid_pkey_idx on mutualfd_we

Re: [ADMIN] OUTER JOIN IS SLOW

2006-12-23 Thread Shoaib Mir
adding to the last email, for now try the work_mem but you should be adding ANALYZE along with the VACUUM (with a cron job I guess) you do regularly. Shoaib Mir EntperpriseDB (www.enterprisedb.com) On 12/24/06, Shoaib Mir <[EMAIL PROTECTED]> wrote: Try increasing the work_mem

Re: [ADMIN] OUTER JOIN IS SLOW

2006-12-23 Thread Shoaib Mir
Try increasing the work_mem first to see the change, that might help. - Shoaib Mir EnterpriseDB (www.enterprisedb.com) On 12/24/06, Benjamin Arai <[EMAIL PROTECTED]> wrote: I have been running pieces of my PL function by hand and I have found that the following queries work by them

[ADMIN] OUTER JOIN IS SLOW

2006-12-23 Thread Benjamin Arai
I have been running pieces of my PL function by hand and I have found that the following queries work by themselves taking less than a second to execute. getDateRange"('12/1/2005','12/1/2006') <- simply generates a date list. Doesn't even access a table SELECT * FROM mutualfd_weekday_qbid