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