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 **********************************************************************