Viewing 15 posts - 1 through 15 (of 29 total)
Yep.
Anyway, we have not used NOLOCK randomly, it is explicitly used where the system has been designed in a way where dirty reads is either okay or will not...
December 16, 2009 at 8:09 am
After doing some reading on the issue it seems that both missing rows and counting rows twice is connected to page splits.
As we have a clustered index on a...
December 16, 2009 at 6:46 am
GilaMonster (12/16/2009)
one-1016367 (12/16/2009)
I wasn't aware that I could get the same row more than once, in which scenario could that happen?
The link I gave you when I first...
December 16, 2009 at 6:07 am
GilaMonster (12/16/2009)
one-1016367 (12/16/2009)
Yes, we are confident using nolock in the given scenario.
You are aware that there is a chance it can can cause rows to be returned more than once,...
December 16, 2009 at 5:43 am
And just to clarify - in my opinion we have satisfactory performance on this table at the moment, the only issue was this particular SP that suddenly wasn't using the...
December 16, 2009 at 5:18 am
ALZDBA (12/16/2009)
How well organized is your clustering index ? (cluster ratio)
- has your index (table) been rebuild lately ?
- Did you load the...
December 16, 2009 at 4:59 am
Oh, didn't see your other notes:
The date is restricted to maximum one month.
T2.Id is indexed.
The date on T1 is the clustered index.
December 16, 2009 at 2:22 am
No, as I said I haven't written this SP, nor have I attempted to optimize it.
When indexes are used the original SP runs relatively fast, but your example...
December 16, 2009 at 2:20 am
Here's the stored procedure. (We do not do SELECT * , but I have removed/modified the column names to shorten the sp and avoid exposure (as this is a...
December 16, 2009 at 2:01 am
Nope, no table variables. I'm not at work at the moment, and I didn't write the stored procedure myself so I don't remember the details. I'll paste the code...
December 15, 2009 at 11:57 am
Okay, I'll give it some thought. The stored procedure lists transactions in the system by date and merchant - and depending on the size of the merchant the result can...
December 15, 2009 at 10:48 am
GilaMonster (12/15/2009)
Or, if you'd like some specific and...
December 15, 2009 at 7:00 am
GilaMonster (12/15/2009)
It's one of the solutions. I referred you several posts ago to a 3-part series that I wrote on parameter sniffing - http://sqlinthewild.co.za/index.php/2007/11/27/parameter-sniffing/
Sorry, I missed that in your previous...
December 15, 2009 at 4:24 am
So, should I do something along the lines of this?
http://elegantcode.com/2008/05/17/sql-parameter-sniffing-and-what-to-do-about-it/
December 15, 2009 at 2:25 am
Today the SP runs fast and is yet again using the indexes, so it appears that the sp_statistics that were run tonight did the trick.
So I guess it was...
December 15, 2009 at 1:25 am
Viewing 15 posts - 1 through 15 (of 29 total)
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy