pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Benjamin Arai <benjamin@araisoft.com>
To: Jeff Frost <jeff@frostconsultingllc.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Problem with large table not using indexes (I think)
Date: Sat, 23 Dec 2006 11:52:06 -0800
Message-ID: <458D88E6.80609@araisoft.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0612231138370.6126@discord.home.frostconsultingllc.com>
References: <458D82D0.5050903@araisoft.com>
	<Pine.LNX.4.64.0612231138370.6126@discord.home.frostconsultingllc.com>

One more note about my problem,  when you run a query on older data in 
the table then it work great but if you query newer data then is very slow.

Ex.

SELECT * from my_table WHERE date >=12/1/2005 and date <= 12/1/2006; <- slow

SELECT * from my_table WHERE date >=12/1/2002 and date <= 12/1/2003; <- fast

It just has to do with the new data for some reason.

Benjamin

Jeff Frost wrote:
> On Sat, 23 Dec 2006, Benjamin Arai wrote:
>
>> The largest table in my database (30GB) has mysteriously went from 
>> taking milli-seconds to perform a query to minutes.  This disks are 
>> fine and I have a 4GB shared_memory.  Could this slow down have to do 
>> with the fsm_max_pages or something else like that?  I made it larger 
>> but the queries still taking a long time.  I do daily vacuum's but I 
>> don't run it with -z or --full.  I would like to avoid doing a --full 
>> if possible because it would literally take over a week to complete.  
>> Any help would be greatly appreciated.
>
> Benjamin,
>
> When is the last time you ran ANALYZE?  That's what the -z option 
> does.  If you're only vacuuming once daily, you should definitely 
> analyze with the -z flag as well.
>



view thread (8+ messages)  latest in thread

Message-ID: <458D88E6.80609@araisoft.com>
Permalink:  ../458D88E6.80609@araisoft.com/
Also on:    postgresql.org/message-id/458D88E6.80609@araisoft.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: benjamin@araisoft.com, jeff@frostconsultingllc.com
  Subject: Re: Problem with large table not using indexes (I think)
  In-Reply-To: <458D88E6.80609@araisoft.com>
  References: <458D82D0.5050903@araisoft.com> <Pine.LNX.4.64.0612231138370.6126@discord.home.frostconsultingllc.com> <458D88E6.80609@araisoft.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox