Re: Using CAST() in WHERE Clause hangs/slows Query
From: ckaneko (ckaneko_at_ffi-hq.com)
Date: 05/25/04
- Next message: Chris Green: "Backup Error Message"
- Previous message: Chris Kennedy: "Copy database from MSDE to SqlServer"
- In reply to: Guillaume: "RE: Using CAST() in WHERE Clause hangs/slows Query"
- Next in thread: Wayne Snyder: "Re: Using CAST() in WHERE Clause hangs/slows Query"
- Reply: Wayne Snyder: "Re: Using CAST() in WHERE Clause hangs/slows Query"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 25 May 2004 13:28:46 -0700
Thanks everyone. I did remove the casting and it did make a big difference!
I created the query in a view then placed it into a stored procedure. The
view placed the Cast function in there.
I still don't understand as to why the query runs quickly sometimes and
other times it doesn't.
"Guillaume" <mssupport@candg2.com> wrote in message
news:310186B3-1158-4766-BB4F-07D239A65D77@microsoft.com...
> I don't pretend to be giving a definitive answer on this, but from what I
know, when you use a function (like CAST) on a column it disables the use of
any regular index on that column.
>
> If you have a lot of data, the simple overhead of using a function could
also slow it down.
>
>
- Next message: Chris Green: "Backup Error Message"
- Previous message: Chris Kennedy: "Copy database from MSDE to SqlServer"
- In reply to: Guillaume: "RE: Using CAST() in WHERE Clause hangs/slows Query"
- Next in thread: Wayne Snyder: "Re: Using CAST() in WHERE Clause hangs/slows Query"
- Reply: Wayne Snyder: "Re: Using CAST() in WHERE Clause hangs/slows Query"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|