I'm not sure if I'm heading up the right alley - seems too simple!, but here is my issue.

I have about 3000 records in 'mytable', and simple

select * from mytable where x=1

is timed as:

Total query runtime: 2933 ms.
Data retrieval runtime: 791 ms.

EXPLAIN says it's Seq Scan, but the actual filter expression I'm using returns me all rows from the table anyway. If I run

select * from mytable

Total query runtime: 3444 ms.
Data retrieval runtime: 771 ms.

At the same time:

select * into x from prl_user_entities

Query returned successfully with no result in 600 ms.

Why SELECT takes 3+ second to execute? Is it something to do with my Postgres server optimization, or PgAdmin does not show correct data retrieval runtime (leaks over into query runtime or something)?

This is PG 8.1 on FreeBSD, server is fairly powerful PC.

Peter

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
      choose an index scan if your joining column's datatypes do not
      match

Reply via email to