Search Postgresql Archives

Re: Index does not working.

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

 



Dan Black <fireworker@xxxxxxxxx> writes:

> 1)
> select * from my_table where active and deleted
> --------------
> Seq Scan on my_table  (cost=100000000.00..100000180.00 rows=2500 width=56)
>   Filter: (active AND deleted)
>
> 2)
> select * from my_table where active = true and deleted = true
> -------------
> Index Scan using my_table_index on my_table  (cost=0.00..369.00 rows=2500
> width=56)
>   Index Cond: ((deleted = true) AND (active = true))

Looks like you haven't ever ANALYZED this table.

-Doug

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux