Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Performance of trunc(date_column) and indexes...
I have a procedure that takes datestamped data, and summaries it based
on hour.
There is an index on the datestamp column, but of course the use of a function on the column stops the use of the index:
insert into summary
select trunc(datestamp,'HH24') newdatestamp,
sum(somecounterA), sum(somecounterB), max(somecounterC)
[about 22Million records in the table, going back 58 days, average 13,000 records per hour]
Anyone any suggestions on how to speed it up. Currently using Oracle 7.3.3.5, and the cost based optimiser.
Jon Waland
Vodafone Ltd.
Received on Thu Jan 21 1999 - 09:12:43 CST