pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Rickard Sjöström <rickard.sjostrom@bluebottle.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-admin@postgresql.org
Subject: Re: PG does not use my index
Date: Mon, 02 Apr 2007 22:39:10 -0700
Message-ID: <200704030539.l335dDh1011778@mi1.bluebottle.com> (raw)
In-Reply-To: <10497.1175529917@sss.pgh.pa.us>
References: <1175253570.460cf2427984c@mail.bluebottle.com>
	<20418.1175271262@sss.pgh.pa.us>
	<1175513194.4610e86a2ffab@mail.bluebottle.com>
	<10497.1175529917@sss.pgh.pa.us>

Hi!
I eventually tried with an 'vacuum analyse' which made postgres to use my index and the query was completed in 200 ms (insted of tens of seconds) and I was happy again!

Thanks!

/Rickard 

Citerar Tom Lane <tgl@sss.pgh.pa.us>:

> Rickard =?iso-8859-1?b?U2r2c3Ry9m0=?=
> <rickard.sjostrom@bluebottle.com> writes:
> > fast db:
> > -------------------------
> >  ->  Index Scan using testcase_b_bid_index on testcase 
> (cost=0.00..1656.82 rows=426 width=38) (never executed)"
> > -------------------------
> 
> > slow db:
> > -------------------------
> > ->  Seq Scan on testcase  (cost=0.00..2896.42 rows=33242
> width=64) (actual time=77.027..791.014 rows=37093 loops=1)"
> > -------------------------
> 
> Let's see the query and the *whole* explain analyze output, not the
> part
> you (mistakenly) think is important.
> 
> 			regards, tom lane
> 




view thread (4+ messages)

Message-ID: <200704030539.l335dDh1011778@mi1.bluebottle.com>
Permalink:  ../200704030539.l335dDh1011778@mi1.bluebottle.com/
Also on:    postgresql.org/message-id/200704030539.l335dDh1011778@mi1.bluebottle.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: rickard.sjostrom@bluebottle.com, tgl@sss.pgh.pa.us
  Subject: Re: PG does not use my index
  In-Reply-To: <200704030539.l335dDh1011778@mi1.bluebottle.com>
  References: <1175253570.460cf2427984c@mail.bluebottle.com> <20418.1175271262@sss.pgh.pa.us> <1175513194.4610e86a2ffab@mail.bluebottle.com> <10497.1175529917@sss.pgh.pa.us> <200704030539.l335dDh1011778@mi1.bluebottle.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