ADSM-L

Re: [ADSM-L] Speeding up my SQL query

2008-05-16 09:19:05
Subject: Re: [ADSM-L] Speeding up my SQL query
From: "Choudarapu, Ramakrishna (GTS)" <Ramakrishna_Choudarapu AT ML DOT COM>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Fri, 16 May 2008 09:17:20 -0400
Eric,

Did you try Q ACTLOG instead, using NODE=NODE_NAME, MSG=MSGNUM BEGINTIME
and ENDTIME parameters, which may be faster than the select, but the
resluts may not be as straight and detailed as your select...

Regards, Rama

-----Original Message-----
From: ADSM: Dist Stor Manager [mailto:ADSM-L AT VM.MARIST DOT EDU] On Behalf Of
Loon, E.J. van - SPLXM
Sent: Friday, May 16, 2008 9:01 AM
To: ADSM-L AT VM.MARIST DOT EDU
Subject: [ADSM-L] Speeding up my SQL query


Hi *SM-ers!
My TSM Operational Reporter creates a daily report for our Windows guys.
Part of this report is a SQL query which returns all missed files. This
is the query:

select -
   actlog.nodename as "Node Name", -
   substr(char(actlog.date_time), 1, 16) as "Date/Time", -
   substr(actlog.message, 26) as "Message" -
from actlog,nodes -
where -
    actlog.nodename=nodes.node_name -
and (actlog.msgno=4005 or actlog.msgno=4007 or actlog.msgno=4018 or
actlog.msgno=4037 or actlog.msgno=4987) -
and (actlog.date_time between '%s' and '%s') -
and (nodes.contact like 'Windows%%') -
order by actlog.nodename

The problem is that the query is taking more that 3 hours to complete,
probably because it's using non-indexed database tables.
Does anyone know how to make this query more efficient?
Thank you VERY much for your help in advance!
Kindest regards,
Eric van Loon
KLM Royal Dutch Airlines


**********************************************************************
For information, services and offers, please visit our web site:
http://www.klm.com. This e-mail and any attachment may contain
confidential and privileged material intended for the addressee
only. If you are not the addressee, you are notified that no part
of the e-mail or any attachment may be disclosed, copied or
distributed, and that any other action related to this e-mail or
attachment is strictly prohibited, and may be unlawful. If you have
received this e-mail by error, please notify the sender immediately
by return e-mail, and delete this message. 

Koninklijke Luchtvaart Maatschappij NV (KLM), its subsidiaries
and/or its employees shall not be liable for the incorrect or
incomplete transmission of this e-mail or any attachments, nor
responsible for any delay in receipt.
Koninklijke Luchtvaart Maatschappij N.V. (also known as KLM Royal
Dutch Airlines) is registered in Amstelveen, The Netherlands, with
registered number 33014286 
**********************************************************************
--------------------------------------------------------

This message w/attachments (message) may be privileged, confidential or 
proprietary, and if you are not an intended recipient, please notify the 
sender, do not use or share it and delete it. Unless specifically indicated, 
this message is not an offer to sell or a solicitation of any investment 
products or other financial product or service, an official confirmation of any 
transaction, or an official statement of Merrill Lynch. Subject to applicable 
law, Merrill Lynch may monitor, review and retain e-communications (EC) 
traveling through its networks/systems. The laws of the country of each 
sender/recipient may impact the handling of EC, and EC may be archived, 
supervised and produced in countries other than the country in which you are 
located. This message cannot be guaranteed to be secure or error-free. This 
message is subject to terms available at the following link: 
http://www.ml.com/e-communications_terms/. By messaging with Merrill Lynch you 
consent to the foregoing.
--------------------------------------------------------

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