Skip site navigation (1) Skip section navigation (2)

Re: Query on postgresql 7.4.2 not using index

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: arnaulist(at)andromeiberica(dot)com
Cc: chris smith <dmagick(at)gmail(dot)com>, pgsql-performance(at)postgresql(dot)org
Subject: Re: Query on postgresql 7.4.2 not using index
Date: 2006-04-25 15:22:59
Message-ID: 19483.1145978579@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-performance
Arnau <arnaulist(at)andromeiberica(dot)com> writes:

>   Seq Scan on agenda_users_groups  (cost=0.00..53108.45 rows=339675 
> width=8) (actual time=916.903..5763.830 rows=367026 loops=1)
>     Filter: (group_id = 9::numeric)
>   Total runtime: 7259.861 ms
> (3 filas)

> espsm_moviltelevision=# select count(*) from agenda_users_groups ;
>    count
> ---------
>   2547556

So the SELECT is fetching nearly 15% of the rows in the table.  The
planner is doing *the right thing* to use a seqscan, at least for
this particular group_id value.

			regards, tom lane

In response to

Responses

pgsql-performance by date

Next:From: ArnauDate: 2006-04-25 15:47:46
Subject: Re: Query on postgresql 7.4.2 not using index
Previous:From: Scott MarloweDate: 2006-04-25 15:05:02
Subject: Re: Query on postgresql 7.4.2 not using index

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group