From: | Jeff Davis <pgsql(at)j-davis(dot)com> |
---|---|
To: | Jason Long <mailing(dot)list(at)supernovasoftware(dot)com> |
Cc: | pgsql-general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Query sometimes takes down server |
Date: | 2009-01-16 06:04:29 |
Message-ID: | 1232085869.17863.15.camel@jdavis |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Thu, 2009-01-15 at 19:37 -0600, Jason Long wrote:
> >
> > > I have not looked into the detail of the explain, and I do see visually
> > > that very different plans are being chosen.
> > >
> >
> > It would help to share these plans with us...
> >
> See EXPLAIN ANALYZE below for three different plans @ .5, 6, and 84
> seconds
Well, it's clear why you're getting a variety of plans. With that many
tables in the FROM list, there are a huge number of possible plans, so
PostgreSQL will use a genetic algorithm to try to find the best one,
which is based on random numbers.
My only advice would be to step back for a minute and see if there might
be a better way to solve the original problem. Typically, numbers in
table and field names are a sign something could be better designed.
I may have some better advice if you say why you are joining so many
tables, and what the numbers are for.
Regards,
Jeff Davis
From | Date | Subject | |
---|---|---|---|
Next Message | Magnus Hagander | 2009-01-16 12:27:04 | Re: Question regarding Postgres + OpenSSL + FIPs |
Previous Message | Oleg Bartunov | 2009-01-16 05:18:05 | Re: Initial ugly reverse-translator |