Search Postgresql Archives

Re: Data comparison SQL in PG 8.2.9

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

 



check explain analyze

tried this on 8.3 with real life data:

-- all rows, index useless
explain analyze select id from cl_customer where modified > '2008-01-01'

Seq Scan on cl_customer (cost=0.00..38958.79 rows=1448639 width=8) (actual time=0.030..682.940 rows=1448783 loops=1)
 Filter: (modified > '2008-01-01 00:00:00'::timestamp without time zone)
Total runtime: 1015.394 ms

-- small subset
explain analyze select id from cl_customer where modified > '2009-01-01'
Index Scan using i_cl_customer_modified on cl_customer (cost=0.00..12.93 rows=144 width=8) (actual time=0.018..0.110 rows=175 loops=1) Index Cond: (modified > '2009-01-01 00:00:00'::timestamp without time zone)
Total runtime: 0.169 ms



Phoenix Kiula schrieb:
Thanks. But it used to work without this, and more importantly, this
doesn't explain why the ">" queries are so exceedingly slow now! Any
thoughts?

begin:vcard
fn:Thomas Markus
n:Markus;Thomas
org:proventis GmbH
adr:;;Zimmerstr. 79-80;Berlin;Berlin;10117;Germany
email;internet:t.markus@xxxxxxxxxxxxx
tel;work:+49 30 29 36 399 22
x-mozilla-html:FALSE
url:http://www.proventis.net
version:2.1
end:vcard

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[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