Search Postgresql Archives

Re: Matching indexe for timestamp

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

 



On Mon, Jan 9, 2017 at 2:58 PM, Job <Job@xxxxxxxxxxxxxxxxxxxx> wrote:

But in the query planner, at that point, Postgresql 9.6.1 seems not to use any index (single on dalle / alle field and combindex index on dalle+alle) but it use seqscan:
 
Seq Scan on gruorari_tmp  (cost=0.00..5.90 rows=290 width=68) (actual time=0.014..0.062 rows=290 loops=1)
                                 ->  Hash  (cost=164.06..164.06 rows=1 width=29) (actual time=0.770..0.770 rows=1 loops=1)


​Given a query with expected "rows=290" I am not surprised that it would simply scan the entire relation.  Especially since you have four columns in your where clause and so any one index would be insufficient.

You sound as if you believe that any query that doesn't use an index is flawed.  That is not the case.

David J.


[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