ADSM-L

Re: select from actlog VS query actlog performance

2004-11-19 11:22:06
Subject: Re: select from actlog VS query actlog performance
From: Andrew Raibeck <storman AT US.IBM DOT COM>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Fri, 19 Nov 2004 09:21:51 -0700
BEGINT=-08:00 starts searching the activity log as of 8 hours from the
present time (as opposed to the default, which is 1 hour from the present
time). Leave out the '-' if you really mean 08:00 (8:00 AM).

The raw TSM server database tables are not row-column format, but more
like a B-tree, and were not originally designed to support SQL. The only
methods for interrogating the database were those provided by the QUERY
commands (QUERY ACTLOG, QUERY FILESPACE, etc.). The QUERY commands are
optimized for accessing the raw tables of the TSM database, and thus
perform quite well.

Because customers wanted more query flexibility than what the TSM server
already provided, and creating individual QUERY commands for each possible
query was not practical (effectively an unbounded list), the SQL interface
was created. The tables presented by the SQL interface are not those of
the raw internal TSM tables; rather, they are virtualized versions of the
internal tables that are created dynamically when you run the SELECT
command (hence the need for available space in the database to run
SELECT). While SELECT gives you more flexibility in the types of queries
you can run, those queries tend to run more slowly.

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.

"ADSM: Dist Stor Manager" <ADSM-L AT VM.MARIST DOT EDU> wrote on 11/19/2004
07:55:02:

> Hello TSM'ers
>
>
>
> I'm doing some scripting that is using actlog queries fairly heavily, I
> have noticed that
>
> Select * from actlog where cast(date_time as date)=current_date and
> process=1234
>
> Is a lot slower than
>
> Q actlog begint=-08:00 se=1234 (say, its 8am in the morning...)
>
>
> Although you need to be carefull you are actually getting what you want
> with the latter version.
>
>
> Is TSM doing anything internally to generate a SQL statement that works
> quicker than mine but gives the same/similar result? - I am assuming
> that internally TSM takes q actlog (and other q commands) and generates
> a SQL statement it then processes against the TSM DB, formatting the
> result to generate the query output as non-tables.
>
>
> Thanks,
>
> Matt.
>
>
>
>
>
> ___________________________ Disclaimer Notice __________________________
> This message and any attachments are confidential and should only be
read by
> those to whom they are addressed. If you are not the intended recipient,

> please contact us, delete the message from your computer and destroy any

> copies. Any distribution or copying without our prior permission is
prohibited.
>
> Internet communications are not always secure and therefore Powergen
Retail
> Limited does not accept legal responsibility for this message. The
recipient
> is responsible for verifying its authenticity before acting on the
contents.
> Any views or opinions presented are solely those of the author and do
not
> necessarily represent those of Powergen Retail Limited.
>
> Registered addresses:
>
> Powergen Retail Limited, Westwood Way, Westwood Business Park, Coventry,
CV4 8LG.
> Registered in England and Wales No: 3407430
>
> Telephone +44 (0) 2476 42 4000
> Fax +44 (0) 2476 42 5432

<Prev in Thread] Current Thread [Next in Thread>