Re: Query 200x slower on server [PART 2]

From: Richard Huxton <dev(at)archonet(dot)com>
To: NbForYou <nbforyou(at)hotmail(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Query 200x slower on server [PART 2]
Date: 2006-07-31 09:26:55
Message-ID: 44CDCCDF.8000304@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

NbForYou wrote:
> See Query 200x slower on server [PART 1] before reading any further

Cant' find it. Sorry.

>
> QUERY PLAN ON MY HOME SERVER
[snip]
> Total runtime: 125.432 ms
>
> This means that the Query is 200 times slower on the webhost!
>
> How can I resolve this?

First - what is different between the two plans and why? PostgreSQL will
be choosing a different plan because:
1. It's estimating different numbers of rows for one or more steps
2. It's estimating a different cost for one or more steps
3. It's triggering the genetic optimiser which means you're not
necessarily going to get the same plan each time.
4. You've got different versions of PG on the different machines.

--
Richard Huxton
Archonet Ltd

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Axel Rau 2006-07-31 10:48:11 directory tree query with big planner variation
Previous Message Richard Huxton 2006-07-31 09:23:31 Re: How to increase performance?