Bookmark Lookups...
- From: "Snake Eyes" <youngbar@xxxxxxxxxxxxx>
- Date: Sun, 27 Aug 2006 22:53:08 -0400
I hope this doesn't show up twice. I didn't see it post. This is better
formatted :)
Anyway, here is my problem:
I have a Stored Procedure that is taking an unusual amount of time
(gradually getting slower) to run. I have analyzed the execution plan via
Query Analyzer and I have identified what portion of the Stored Procedure is
causing the problem. I have analyzed the indexes and added other index
fields in the query with no luck. The stored procedure accepts parameters,
and I use those in the where clause. Breaking down the query, I have tried
changing the data types of the @parameter variables to exactly match the
columns in the table. But still sluggish performance.
One thing I noticed, and this has happened to me before, is that if I hard
code some values in the same Select statement, the stored procedure seems to
run much faster. If I hard code a date ranges in the proc ie between
'01/01/2006' and '01/25/2006' , it runs much faster (as there are no
bookmark lookups), but if I use the same values assigning them to varchar,
char, datetime, or smalldate
time (tried most logical ones, to equal the table column) it triggers a
bookmark lookup. With the hard coded date values the execution plan shows
that the query is now utilizing the indexes and it reduces the bookmark
lookups in some cases from 49% to 15% or less.
Any ideas??
Thanks
.
- Follow-Ups:
- Re: Bookmark Lookups...
- From: Tracy McKibben
- Re: Bookmark Lookups...
- From: aneeshattingal
- Re: Bookmark Lookups...
- Prev by Date: SQL2K Question
- Next by Date: Re: SQL2K Question
- Previous by thread: SQL2K Question
- Next by thread: Re: Bookmark Lookups...
- Index(es):
Relevant Pages
|