Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Advanced search and optimizing
Message
From
21/01/2014 17:10:04
 
 
General information
Forum:
Microsoft SQL Server
Category:
Indexing
Environment versions
SQL Server:
SQL Server 2008
Application:
Web
Miscellaneous
Thread ID:
01592213
Message ID:
01592258
Views:
42
>OK, might be premature to make a suggestion, but sometimes breaking up into multiple steps can help.
>
>I just took a query that was running way too long and did a "divide and conquer". Grabbed a chunk into a table variable and then did a subsequent query from that - brought the time down significantly. Not saying that would necessarily solve your problems, but something to at least consider.

Yes, this is all good. I wish I could have all that by pressing one key. :)

In overall, the query contains all the fields necessary for the output, the fields for the conditions and the INNER JOINs. I see this one as you said. I have been thinking about that since this afternoon. For such kind of flexibility to the user, I'd say also that we need to break it out. I will start by splitting it in two. Thus, I will only extract the primary keys with the conditions at first. Then, I will do another SQL select command to collect all the output fields with the INNER JOINs.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Reply
Map
View

Click here to load this message in the networking platform