Viewing 15 posts - 136 through 150 (of 170 total)
That's a fair point; though I guess you'll also quickly see if there are major estimate issues there from the discrepancy between estimated row counts and actuals? Is that...
May 12, 2012 at 3:29 am
The only other way to "cache" a view if you aren't able to index it for any reason, would be to use a procedure to insert the results into a...
May 12, 2012 at 3:26 am
Whoops meant to include the actual plan in there.
The only reason I sometimes start with the estimated plan is in my environment I frequently have to work with ad hoc...
May 12, 2012 at 2:51 am
The way to use ROW_NUMBER to find the gaps in a sequence is by first finding your groups of day were the number is sequential. This is done by...
May 12, 2012 at 2:27 am
You can try using the estimated query plan with both queries in te same batch, that will show a percentage of the batch that each query takes in terms of...
May 12, 2012 at 2:19 am
You can't construct foreign keys between two different databases.
If you want to maintain referential integrity, you will need to move those tables into the main database. If you have...
May 12, 2012 at 2:15 am
GilaMonster (5/12/2012)
As I said, my initial thought about it is score1 and score2 are two different sort order if I choose any none equal operator, so it will actually do...
May 12, 2012 at 2:10 am
Smacks of comparing values within a view that are derived from another view. But as mentioned previously, definitions will help; and please make sure you include definitions of the views...
May 11, 2012 at 2:02 pm
This is reminding me of a script I saw from a colleague to call a slow stored procedure several times over with different parameters; so instead of optimising the procedure...
May 11, 2012 at 1:21 pm
You need to add the value you wish to reseed it to, so:-
DBCC CHECKIDENT ('#Temp', RESEED, 8)
May 11, 2012 at 10:35 am
The way to get the weight grouping you're after is the FLOOR command against a decimal.
The code would look something like this:-
IF OBJECT_ID('tempdb..#Package') IS NOT NULL
DROP TABLE #Package
CREATE TABLE #Package
(PackageID...
May 11, 2012 at 10:31 am
How are you trying to open them? SSIS? A linked server?
You're most likely going to need to get the 64 bit version of the ACE driver.
However, if you can post...
May 11, 2012 at 9:00 am
I think you have it backwards: if you use a WHERE clause in a SELECT statement, having an appropriate index on the column(s) that your WHERE clause is using will...
May 11, 2012 at 7:07 am
If you get the chance, I'd recommend checking out Itzik Ben-Gan's "Inside Microsoft SQL Server 2008: T-SQL Querying" book, it has some really good examples of the benefits of using...
May 11, 2012 at 6:52 am
Do you mean the WHERE clause is in the index creation statement? Or do you mean in the SELECT statement you are using to query?
May 11, 2012 at 6:39 am
Viewing 15 posts - 136 through 150 (of 170 total)