Thanks for the suggestion, however; this query runs in under 2
minutes (big data set) on the server it originated from, and Iâm trying to
ascertain why there is such a difference in performance between what should be
two like for like server, as there are many other queries of a similar nature
that have bigger sort operations to perform, and I honestly donât want to have
to re-write them all. Setting enable_hashagg = off causes the query to complete,
however; it means the next batch queries never completes (left it > 8 hours)
when ordinarily itâs done in 5 minutes. Thanksâ Martin. From: scorpdaddy@xxxxxxxxxxx
[mailto:scorpdaddy@xxxxxxxxxxx] Have you tried moving the FROM
... WHERE ... into a sub-select? GROUP BY uses HAVING, not WHERE. ___________________________________________________ This email is intended for the named recipient. The information contained in it is confidential. You should not copy it for any purposes, nor disclose its contents to any other party. If you received this email in error, please notify the sender immediately via email, and delete it from your computer. Any views or opinions presented are solely those of the author and do not necessarily represent those of the company. PCI Compliancy: Please note, we do not send or wish to receive banking, credit or debit card information by email or any other form of communication. Cromwell Tools Limited, PO Box 14, 65 Chartwell Drive Wigston, Leicester LE18 1AT. Tel 0116 2888000 Registered in England and Wales, Reg No 00986161 VAT GB 115 5713 87 900 __________________________________________________ |