
Signature
Hope this helps.
Dan Guzman
SQL Server MVP
http://weblogs.sqlteam.com/dang/
On Jul 2, 8:36 am, "Dan Guzman" <guzma...@nospam-online.sbcglobal.net>
wrote:
> > Why would the same query running against essentially the same database
> > (except one is on the publisher and one is on the subscriber) behave
[quoted text clipped - 33 lines]
> > Any suggestions on where I should look first in production?
> > T.
But how can I check execution plan on the publisher if the query never
completes and times out? Is there another way?
T.
Tracy McKibben (http://www.realsqlguy.com) - 02 Jul 2008 13:53 GMT
> But how can I check execution plan on the publisher if the query never
> completes and times out? Is there another way?
>
> T.
Look at the ESTIMATED query plan - third button to the right of
"Execute" on the default Management Studio toolbar...
Dan Guzman - 02 Jul 2008 14:00 GMT
To add to Tracy's response, you can also display the estimated plan by
pressing ctrl-L in the SSMS query window.

Signature
Hope this helps.
Dan Guzman
SQL Server MVP
http://weblogs.sqlteam.com/dang/
> On Jul 2, 8:36 am, "Dan Guzman" <guzma...@nospam-online.sbcglobal.net>
> wrote:
[quoted text clipped - 41 lines]
>
> T.
Plamen Ratchev - 02 Jul 2008 14:40 GMT
One more option is to use:
SET SHOWPLAN_XML ON
This will return the execution plan instead of executing the query.
HTH,
Plamen Ratchev
http://www.SQLStudio.com
TheSQLGuru - 02 Jul 2008 16:21 GMT
Check out update statistics (or sp_updatestats) in BOL. Just run it and see
if it helps.
Also, can you post the exact message you get when the query fails (something
about semaphore).
Are the two servers configured EXACTLY the same (sp_configure, with show
advanced options on). BTW, how much ram is sql server currently taking up
on the box?

Signature
Kevin G. Boles
Indicium Resources, Inc.
SQL Server MVP
kgboles a earthlink dt net
> On Jul 2, 8:36 am, "Dan Guzman" <guzma...@nospam-online.sbcglobal.net>
> wrote:
[quoted text clipped - 41 lines]
>
> T.
On Jul 2, 8:36 am, "Dan Guzman" <guzma...@nospam-online.sbcglobal.net>
wrote:
> > Why would the same query running against essentially the same database
> > (except one is on the publisher and one is on the subscriber) behave
[quoted text clipped - 35 lines]
>
> - Show quoted text -
updated stats - same thing. Query runs a long time.
Dan Guzman - 03 Jul 2008 13:01 GMT
> updated stats - same thing. Query runs a long time.
Did you compare the execution plans?

Signature
Hope this helps.
Dan Guzman
SQL Server MVP
http://weblogs.sqlteam.com/dang/
On Jul 2, 8:36 am, "Dan Guzman" <guzma...@nospam-online.sbcglobal.net>
wrote:
> > Why would the same query running against essentially the same database
> > (except one is on the publisher and one is on the subscriber) behave
[quoted text clipped - 39 lines]
>
> - Show quoted text -
updated stats - same thing. Query runs a long time.