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')
CONSTRAINT pk_st_statistic_id
PRIMARY KEY,
TIMESTAMP_IN TIMESTAMP,
VALUE NUMERIC(10)
);
The queries on this table are mainly related with the timestamp field,
e.g.:
select * from statistics where time::date < current_date - interval
'1 month';
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?
Thank you very much
--
Arnau