From: | "Shoaib Mir" <shoaibmir(at)gmail(dot)com> |
---|---|
To: | "Benjamin Arai" <benjamin(at)araisoft(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org, pgsql-admin(at)postgresql(dot)org |
Subject: | Re: OUTER JOIN IS SLOW |
Date: | 2006-12-23 20:21:15 |
Message-ID: | bf54be870612231221l515f33b5k39c455476de0db7c@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin pgsql-general |
....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 <shoaibmir(at)gmail(dot)com> wrote:
>
> 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 <benjamin(at)araisoft(dot)com> wrote:
> >
> > 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 WHERE cusip='92193920' AND pkey >=
> > '12/15/2005' AND pkey <= '12/15/2006';
> >
> > But when combined as below it takes 10 seconds to execute.
> >
> > SELECT d1 as date, d2.data as data FROM
> > "getDateRange"('12/1/2005','12/1/2006') d1 FULL OUTER JOIN (SELECT *
> > FROM mutualfd_weekday_qbid WHERE cusip='92193920' AND pkey >=
> > '12/15/2005' AND pkey <= '12/15/2006') d2 ON d1=d2.pkey;
> >
> > Do I need to increase the work_mem or is this possible still a ANALYZE
> > issue?
> >
> > Benjamin
> >
> > ---------------------------(end of broadcast)---------------------------
> >
> > TIP 7: You can help support the PostgreSQL project by donating at
> >
> > http://www.postgresql.org/about/donate
> >
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Benjamin Arai | 2006-12-23 20:40:23 | Re: [GENERAL] OUTER JOIN IS SLOW |
Previous Message | Shoaib Mir | 2006-12-23 20:17:45 | Re: OUTER JOIN IS SLOW |
From | Date | Subject | |
---|---|---|---|
Next Message | Benjamin Arai | 2006-12-23 20:40:23 | Re: [GENERAL] OUTER JOIN IS SLOW |
Previous Message | Shoaib Mir | 2006-12-23 20:17:45 | Re: OUTER JOIN IS SLOW |