Quantcast
Channel: Help optimizing query
Browsing all 9 articles
Browse latest View live

Help optimizing query

Thanks all for the help. Yes, this is a bunch of UNIONS, and I figured my indexes weren't helping. I am going to see what I can to mitigate the UNIONs and also I'm going to go back and try to filter...

View Article



Help optimizing query

I scanned through the monster queries and looked at the DDL.Typically, using DISTINCT and/or UNION (which implies DISTINCT) is ofter very expensive, and most of the time not needed. If there are...

View Article

Help optimizing query

Try UNION ALL in place of UNION if you  can have the same result.

View Article

Image may be NSFW.
Clik here to view.

Help optimizing query

UNION SELECT DISTINCT I noticed this part, I don't think you require distinct in the individual query levels as the union will remove the duplicates. If the queries participating in union returns a...

View Article

Help optimizing query

Again, I didn't look close, but I started from the very top query now.First of all, using DISTINCT often indicates a problem in the data. I think you may want to drop DISTINCT and see if the result...

View Article


Help optimizing query

I didn't look into the monster in details, but one thing caught my attention:This partWHERE Tag = 'Expired Compact License' AND NOT EXISTS (SELECT 1 FROM TravelerOrderReportMatching WHERE Tag = 'Worked...

View Article

Help optimizing query

Good point!! Let me change it up and see how much that cuts it down. Still looking for maybe some help with the MATCHING query time if someone gets a chance. Thank you Naomi

View Article

Help optimizing query

I didn't look into the monster in details, but one thing caught my attention:This partWHERE Tag = 'Expired Compact License' AND NOT EXISTS (SELECT 1 FROM TravelerOrderReportMatching WHERE Tag = 'Worked...

View Article


Help optimizing query

I have quite a complex query that is used to match up certain people to orders (jobs). The problem is all the data that needs to be collected from various tables, and I've tried to consolidate the...

View Article

Browsing all 9 articles
Browse latest View live




Latest Images