Re: [PERFORM] Queries with timestamps

2004-01-21 Thread Josh Berkus
Richard, > (I think Tip 3 is already fixed in 7.3, or I misunderstand what Josh is > saying) Yeah? Certainly looks like it. Apparently I can't keep track. I'd swear that this issue reared its ugly head again shortly before the 7.4 release. -- -Josh Berkus Aglio Database Solutions San Fr

Re: [PERFORM] Queries with timestamps

2004-01-21 Thread Richard Huxton
On Wednesday 21 January 2004 19:06, Josh Berkus wrote: > Arnau, > > > As the number of rows grows the time needed to execute this query > > takes longer. What'd I should do improve the performance of this query? > > Tip #1) add an index to the timestamp column > Tip #2) make sure that you VAC

Re: [PERFORM] Queries with timestamps

2004-01-21 Thread Josh Berkus
Arnau, > As the number of rows grows the time needed to execute this query takes > longer. What'd I should do improve the performance of this query? Tip #1) add an index to the timestamp column Tip #2) make sure that you VACUUM and ANALYZE regularly Tip #3) You will get better performance i

[PERFORM] Queries with timestamps

2004-01-21 Thread Arnau
Hi all, I'm quite newbie in SQL and I have a performance problem. I have the following table (with some extra fields) and without any index: CREATE TABLE STATISTICS ( STATISTIC_ID NUMERIC(10) NOT NULL DEFAULT nextval('STATISTIC_ID_SEQ')