Re: [GENERAL] Data comparison SQL in PG 8.2.9

2009-01-12 Thread Shane Ambler
Phoenix Kiula wrote: Table "public.users" Column |Type | Modifiers ---+-+-- modify_date | timestamp without time zone |

Re: [GENERAL] Data comparison SQL in PG 8.2.9

2009-01-12 Thread Reg Me Please
On Monday 12 January 2009 10:18:59 Phoenix Kiula wrote: > > When queries used to be fast and now are slow very often depends upon the > > indexes. Less frequently upon the amount of memory available for cache > > and the server configuration. > > Do you used ti have any index on that column? > > Do

Re: [GENERAL] Data comparison SQL in PG 8.2.9

2009-01-12 Thread Phoenix Kiula
> When queries used to be fast and now are slow very often depends upon the > indexes. Less frequently upon the amount of memory available for cache and > the server configuration. > Do you used ti have any index on that column? > Do you have server configuration files for comparison? The config

Re: [GENERAL] Data comparison SQL in PG 8.2.9

2009-01-12 Thread Reg Me Please
On Monday 12 January 2009 09:40:22 Phoenix Kiula wrote: > 2009/1/12 Thomas Markus : > 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? When queries used to be fast and now are slow very often de

Re: [GENERAL] Data comparison SQL in PG 8.2.9

2009-01-12 Thread Thomas Markus
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: (modi

Re: [GENERAL] Data comparison SQL in PG 8.2.9

2009-01-12 Thread Phoenix Kiula
2009/1/12 Thomas Markus : > be sure to use correct data types. I suppose psql uses timestamps so > > select id from users where modify_date = '2009-01-08' limit 1; > > is converted to > > select id from users where modify_date = '2009-01-08 00:00:00'::timestamp > limit 1; > > > try > > select id fr

Re: [GENERAL] Data comparison SQL in PG 8.2.9

2009-01-11 Thread Thomas Markus
be sure to use correct data types. I suppose psql uses timestamps so select id from users where modify_date = '2009-01-08' limit 1; is converted to select id from users where modify_date = '2009-01-08 00:00:00'::timestamp limit 1; try select id from users where modify_date::date = '2009-01-