Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Optimizing a SQL command
Message
From
13/09/2013 11:40:26
 
 
To
13/09/2013 11:29:14
General information
Forum:
Microsoft SQL Server
Category:
Other
Environment versions
SQL Server:
SQL Server 2008
Application:
Web
Miscellaneous
Thread ID:
01583170
Message ID:
01583176
Views:
44
Michel,

Just a general question...do you have indexes defined for the following tables:

TASK: NoRobot, NoRobotTimeFrame, AddUser, ModUser
Robot: Numero
Server: Numero
RobotTimeFrame: Numero
Member: Numero

Obviously, you need to weight the benefits of any one index with the cost of maintaining that index when new rows are inserted.

Just a suggestion - sometimes a self-join is better optimized by instead running a subquery...for instance, you join into Member twice. There's no hard and fast rule, but sometimes creating a temporary result set definition can perform better than a self-join. But based on the # of rows you're describing, it might not make much difference.

Without any selectivity (WHERE clause), you're basically left with making sure the indexes cover the query. (And by the way, creating covering indexes to include the non-key columns you retrieve in the SELECT can further boost performance....though again, at the possible expense of time to insert new rows)

So you might have a bit of research work ahead of you to add/tweak any indexes, and perhaps investigate covering indexes.

Hope this helps...

Kevin
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform