Re: index and seq scan - Mailing list pgsql-general

From Tina Messmann
Subject Re: index and seq scan
Date
Msg-id 3C3E9E97.4080108@xinux.de
Whole thread Raw
In response to index and seq scan  (Tina Messmann <tina.messmann@xinux.de>)
List pgsql-general
Hello,

uups, the second query should be 'appid < 10', sorry for this.

vaccum analyze was performed on the table just before the queries were
executed.
The estimations are correct:
db=# select count(*) from test where appid > 10;
count
-------
81023
(1 row)

The runtime is not the problem in this case (with seq scan about 1sec,
after enabling seq scan and using index scan about 1sec), i was just
wondering why Postgres is using seq scan  on 'appid > 10' and index scan
on 'appid < 10'.

Thank you all for the answers.

regards
Tina


pgsql-general by date:

Previous
From: Jean-Michel POURE
Date:
Subject: Home Location Registry (HLR) and VLR databases
Next
From: will trillich
Date:
Subject: Re: caching subtotals: update vs sum -- aaugh!