Re: sql server 2000 - slow record retrieval
From: Anith Sen (anith_at_bizdatasolutions.com)
Date: 03/29/04
- Next message: Anith Sen: "Re: additional note"
- Previous message: Anith Sen: "Re: 'Create' User Forms From the Database?"
- In reply to: byron: "sql server 2000 - slow record retrieval"
- Next in thread: byron: "Re: sql server 2000 - slow record retrieval"
- Reply: byron: "Re: sql server 2000 - slow record retrieval"
- Messages sorted by: [ date ] [ thread ]
Date: Sun, 28 Mar 2004 21:18:14 -0600
Is there an index on your MessageQueue table? Have you checked the execution
plans to find out the differences between index usage between #1 & #2? If
you haven't, I suggest you to check if #1 uses a scan while #2 uses an index
seek.
If that is not an issue, here is another guess: Since SQL Server can know
the outcome of the predicate 0=1 as FALSE without any parameter substitution
or further optimization, the execution plan is possibly built during the
trivial optimization endeavor & is much simpler. Thus it enables a faster
execution of #2. In case of #1, each possible permutation of the predicates
needs to be considered which may have generated a complex access path. This
causes the lousy execution of #1.
-- Anith
- Next message: Anith Sen: "Re: additional note"
- Previous message: Anith Sen: "Re: 'Create' User Forms From the Database?"
- In reply to: byron: "sql server 2000 - slow record retrieval"
- Next in thread: byron: "Re: sql server 2000 - slow record retrieval"
- Reply: byron: "Re: sql server 2000 - slow record retrieval"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|