Re: Query on postgresql 7.4.2 not using index

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Arnau <arnaulist@xxxxxxxxxxxxxxxxxx> 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


[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux