ADSM-L

Re: select * from events - only today's events

2001-11-23 22:59:40
Subject: Re: select * from events - only today's events
From: Andrew Raibeck <storman AT US.IBM DOT COM>
Date: Fri, 23 Nov 2001 22:56:59 -0500
>> I heard they actually put quite some time into hacking
this select to do exactly that that none of use really want it to do... <<

I'm not sure where you got this information from, but this is certainly
not true.

An APAR was opened a while ago on this. The APAR number is IC28825, and is
has been closed as SUG (suggestion). Rather than re-write an explanation
myself, I will just quote from the APAR closing text:

====================
The EVENTS table is not an actual physical table.  The events
are calculated from values in other tables.  The server is able
to calculate events for past events where it no longer has an
event record and for future events.  Future events are
accessible with QUERY EVENT but not with SELECT from EVENTS.
Since the events are unbounded, the default is to only give
the events from the current day.  You can select events in a
date range using:
     select * from events where scheduled_start
     between '2001-02-20 00:00:00' and '2001-02-22 23:59:59'
====================

While I'm sure it is possible to have SELECT from the EVENTS table work
more like one would expect, being that there is no actual EVENTS table per
se, it is easier said than done. Since the table is unbounded, the set of
all rows would be those rows from the earliest through latest dates that
can be represented in a timestamp field. Not only would you get an
unwieldy number of rows, but it would probably take a long time to
calculate them. While this would be (technically) the correct way for the
SELECT to work, it isn't practical. So it was decided to just return
events for the current day up through the current time.

For whatever it is worth, I would like to see SELECT * FROM EVENTS return
rows for all events starting from as far back as the event record
retention goes up through the current time.

Regards,

Andy

Andy Raibeck
IBM Software Group
Tivoli Storage Manager Client Development
Internal Notes e-mail: Andrew Raibeck/Tucson/IBM@IBMUS
Internet e-mail: storman AT us.ibm DOT com

The only dumb question is the one that goes unasked.
The command line is your friend.
"Good enough" is the enemy of excellence.




Remco Post <r.post AT SARA DOT NL>
Sent by: "ADSM: Dist Stor Manager" <ADSM-L AT VM.MARIST DOT EDU>
11/22/2001 02:37
Please respond to "ADSM: Dist Stor Manager"


        To:     ADSM-L AT VM.MARIST DOT EDU
        cc:
        Subject:        Re: select * from events - only today's events



> Am I missing something?
>
> I have Eventretention set to 90 days.  I can use "query event" to see
event
> data from days past.
>
> But if I use "select * from events" I only get events from today, no
> historical data.
>
> Shouldn't the Events table have previous days results in it?
>
> Thanks... Ken
>
Nope, the people at tivoli did however. At least, it 'works as designed'
but
they decided that 'select * from events' should return the same as 'q
event',
eg. only todays data. I heard they actually put quite some time into
hacking
this select to do exactly that that none of use really want it to do...


--
Met vriendelijke groeten,
Met vriendelijke groeten,

Remco Post

SARA - Stichting Academisch Rekencentrum Amsterdam
High Performance Computing  Tel. +31 20 592 8008    Fax. +31 20 668 3167

"I really didn't foresee the Internet. But then, neither did the computer
industry. Not that that tells us very much of course - the computer
industry
didn't even foresee that the century was going to end." -- Douglas Adams