Re: Query time

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: Ruben Rubio Rey <ruben(at)rentalia(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Query time
Date: 2006-03-10 10:48:26
Message-ID: 20060310104826.GA14532@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Fri, Mar 10, 2006 at 11:05:57AM +0100, Ruben Rubio Rey wrote:
> Sometimes some big query takes between 5 to 15 seconds. It happens
> sometimes all the day it does not depend if database is busy.
>
> I have measured that sentence in 15 - 70 ms in normal circunstances.

Is it the *exact* same query, including the values you're querying
for? The same query with different values can run with different
plans depending on row count estimates. It might be useful to see
the query string and the EXPLAIN ANALYZE output for a fast query
and a slow one.

How many tables are you querying? Might you be hitting geqo_threshold
(default 12)? If so then the following thread might be helpful:

http://archives.postgresql.org/pgsql-performance/2006-01/msg00132.php

--
Michael Fuhr

In response to

  • Query time at 2006-03-10 10:05:57 from Ruben Rubio Rey

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message PFC 2006-03-10 11:38:54 Re: Process Time X200
Previous Message NbForYou 2006-03-10 10:45:06 Re: Process Time X200