Re: Query sometimes takes down server - Mailing list pgsql-general

From Jeff Davis
Subject Re: Query sometimes takes down server
Date
Msg-id 1232085869.17863.15.camel@jdavis
Whole thread Raw
In response to Query sometimes takes down server  (Jason Long <mailing.list@supernovasoftware.com>)
Responses Re: Query sometimes takes down server  ("Scott Marlowe" <scott.marlowe@gmail.com>)
List 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


pgsql-general by date:

Previous
From: Oleg Bartunov
Date:
Subject: Re: Initial ugly reverse-translator
Next
From: Magnus Hagander
Date:
Subject: Re: Question regarding Postgres + OpenSSL + FIPs