Viewing 15 posts - 451 through 465 (of 1,347 total)
The difference is likely due to parameter sniffing. Search around, there are many references to the issue, both here
and in the SQL Server newsgroups
Here's one:
June 7, 2006 at 1:16 pm
>>Scope is certainly one crucial difference which you would have thought had implications for performance.
Why would scope impact performance ? Consider #Temp tables versus ##Temp tables. Again, difference is only...
June 7, 2006 at 1:08 pm
A variable is constrained by scope. It doesn't matter if it's a simple int or varchar, or a table variable, regardless, it only has scope to the batch containing it.
------Integer...
June 7, 2006 at 11:22 am
#Tables are given a unique suffix to make them unique to the process that created them, and are cleaned up automatically when the session ends.
2 or more SQL processes can...
June 7, 2006 at 9:57 am
Distribution of data affects the selectivity of an index. If you were to index a column containing, say, Gender, which contained only the values 'M' and 'F', the SQL optimizer...
June 6, 2006 at 4:11 pm
It depends on the environment and the volume of inserts. A clustered index on an identity forces all inserts to be to pages at the "end" of the table.
Is...
June 6, 2006 at 3:36 pm
>>I have scoured other threads and have tried DBCC commands, ReIndexing/Defragging
Those don't have much impact if the tables don't have a clustered index and have become highly fragmented heaps. Table & index DDL along...
June 6, 2006 at 2:40 pm
Are those the only indexes on the table(s) ? It appears as if neither has a clustered index, so both tables may have become highly fragmented as a result.
Also, this...
June 6, 2006 at 11:03 am
Is it always after the text "E-mail:" and before the text " Notes:" ?
If yes, then read BOL on the CharIndex() and Substring() functions.
June 2, 2006 at 12:59 pm
In SQL 2005, there are RANK functions which can generate sequences for situations like this.
In SQL2000, you typically join to a derived table, which uses 1 ofthe SQL aggregate functions...
June 2, 2006 at 10:49 am
Many options to choose from. Divide by zero should do it:
SELECT 1 / 0
June 2, 2006 at 8:57 am
SELECT M.VirtualVenue
FROM Meetings M LEFT JOIN Reservations R ON ReservationMeetingID=MeetingID
WHERE Is_Master=0
AND M.Cancelled=0
AND R.Cancelled=0
If you LEFT JOIN a table, but then reference one of that table's columns in the...
June 1, 2006 at 4:03 pm
Didn't see this asked, and it was probably assumed based on the join syntax ... but, are both clustered indexes unique on the phone number columns ?
If SELECT is fast, and...
June 1, 2006 at 12:27 pm
I think what's being suggested is select the primary key, plus the subset of columns that are to be updated, out of 1 table ("Cold2") and into a 'temporary' or staging...
June 1, 2006 at 12:00 pm
ALTER TABLE dbo.PaymentTypes ADD CONSTRAINT
PK_PaymentTypes PRIMARY KEY
(
typeid,
paymentid
)
June 1, 2006 at 11:10 am
Viewing 15 posts - 451 through 465 (of 1,347 total)