Re: PG does not use my index

From: Rickard Sjöström <rickard(dot)sjostrom(at)bluebottle(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: PG does not use my index
Date: 2007-04-03 05:39:10
Message-ID: 200704030539.l335dDh1011778@mi1.bluebottle.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

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(at)sss(dot)pgh(dot)pa(dot)us>:

> Rickard =?iso-8859-1?b?U2r2c3Ry9m0=?=
> <rickard(dot)sjostrom(at)bluebottle(dot)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
>

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Mageshwaran 2007-04-03 06:15:17 UNIX TIME STAMP
Previous Message Tom Lane 2007-04-02 16:22:39 Re: Dumping views, functions, ...