optimal selects and indexes ?

2003-03-28 Thread Steve Phillips
Hey there, I have a database where i am collecting netflow records, the number of entries in a table after a day or so reaching toward the millions of rows I am trying to pull hourly reports, summarizing the byte count's for the hour previous and writing this out to a csv file My query

Re: optimal selects and indexes ?

2003-03-28 Thread Paul DuBois
At 10:08 -1100 3/28/03, Steve Phillips wrote: Hey there, I have a database where i am collecting netflow records, the number of entries in a table after a day or so reaching toward the millions of rows I am trying to pull hourly reports, summarizing the byte count's for the hour previous and

RE: optimal selects and indexes ?

2003-03-28 Thread Dathan Vance Pattishall
: optimal selects and indexes ? Hey there, I have a database where i am collecting netflow records, the number of entries in a table after a day or so reaching toward the millions of rows I am trying to pull hourly reports, summarizing the byte count's for the hour previous and writing this out

Re: optimal selects and indexes ?

2003-03-28 Thread Keith C. Ivey
On 28 Mar 2003 at 10:08, Steve Phillips wrote: SELECT sum(bytes) FROM tb_ipdata_0303 WHERE (source_ip 3329275903 AND source_ip 3329276160) OR (dest_ip 3329275903 AND dest_ip 3329276160) AND (time 1048802400 AND time 1048805999); Using OR like that prevents indexes from being used.