Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
hesta96
Starting Member
9 Posts |
Posted - 2002-06-10 : 04:58:34
|
| Hello.I have a problem with a sql-query that is generating a lot of reads in the DB according to SQL-Profiler, but not acordning to "Set Statistics Time ON AND Set Statistics IO ON" and "show execution plan" in SQL Query Analyzer. In Profiler it says that it generate around 20000 reads and in Query Analyzer it says about 400 reads. Can anyone tell me why that is?? The question is a Stored Procedure and lookes like this:Select pub.ID,txt.Title, pub.publishingstart,unit.SitePath From Published as pub Inner Join Texts as txt On pub.TextID = txt.ID Inner Join Rel_TextsKeywords as relkey On txt.ID = relkey.TextID Inner Join Keywords as keyword On relkey.KeyWordID = keyword.ID Inner Join Units as unit On pub.UnitID = unit.IDWhere pub.Adjustable <> 2 AND pub.UnitID = 83 AND pub.Obj_type=1 AND keyword.ID = 5 AND pub.Active = 1 AND pub.publishingStart < getdate() AND pub.PublishingStop > getdate()Order By pub.publishingstart desc I have used Index Tuning Wizard to set the optimal index on the database and the two big tables Published and Texts have only about 74000 rows each.Please help!SincerelyHenrik StahleSR |
|
|
VyasKN
SQL Server MVP & SQLTeam MVY
313 Posts |
|
|
|
|
|