On Mar 16, 2010, at 1:15 PM, yoda woya wrote:
> I am trying to run this sql and cannot get a result
>
> select date(start_time), sum(bytes)
>
> from
> summary
> where
> ACTIVITY = 'BACKUP'
> or ACTIVITY = 'RESTORE'
>
> group by date(start_time)
>
> any reasons why??
Probably, performance.
Using OR is considerably less efficient than using IN;
so try "... where ACTIVITY in ('BACKUP','RESTORE') ..."
Further, if you never need Summary data older than a certain number of days,
consider having your SUMmaryretention value close to that, to reduce bulk in
the table.
Richard Sims http://people.bu.edu/rbs/
|