Thread View: comp.databases.ms-sqlserver
1 messages
1 total messages
Started by Brent Eubanks
Thu, 06 Mar 1997 00:00
Need a guru's help with optimization
Author: Brent Eubanks
Date: Thu, 06 Mar 1997 00:00
Date: Thu, 06 Mar 1997 00:00
40 lines
1672 bytes
1672 bytes
Oh great guru! This humble one begs you to enlighten him with your wisdom on the matter of optimizing SQL scripts. 1) When doing a select/where/groupby or select/where/orderby, am I correct in assuming that the limitting operation (the where clause) is imposed before the order or group operation? IE: When working with a _very_ large table, is there any reason to separate the operation into a select/into#temp/where followed by a select/from#temp/groupby, in order to avoid applying the orderby or groupby to the entire orginal table? 2) I am writing a procedure that uses a series of select statements and a number of temp tables. Is it more efficient to drop each temp table as soon as I am finished with it in order to free up the cache space, or am I better off avoiding the drop operations and just letting SQL drop them automatically all at once when the procedure ends? I am running SQL Server 6.5 under NT 4.0. I would appreciate it if replies were cc'd to my email account: brent@ugcs.caltech.edu Thanks Brent -- -- Brent Eubanks brent@ugcs.caltech.edu
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads