Is there a performance hit selecting rows based upon a constructed CASE column?
Teradata Teradata Discussion Forums Teradata.com Discussion Forum
Visit Teradata.com
Home       Guidelines    Member List
Welcome Guest ( Login | Register )
        


This online forum is for user-to-user discussions of Teradata products, and is not an official customer support channel for Teradata. If you require direct assistance, please contact Teradata support.


Is there a performance hit selecting rows... Expand / Collapse
Author
Message
Posted 4/2/2008 5:35:59 PM
Junior Member

Junior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior Member

Group: Forum Members
Last Login: Yesterday @ 3:36:10 AM
Posts: 20, Visits: 67
Hi,

Quick question. I think there is no difference, but I need to be sure.

In a SELECT or INSERT statement if I use a CASE statement to create a new column and then select rows based upon the value of that new column, is it any slower (or faster) than simply repeating the logic of the CASE statement as a direct WHERE condition?

I'm processing a *lot* of data with nasty string functions and I need every ounce of optimisation I can get :)

Thanks

Tim
Post #11127
Posted 4/3/2008 3:11:43 AM
Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Forum Members
Last Login: 6/25/2008 7:26:06 AM
Posts: 474, Visits: 202
Hi Ti,
you're right, there's no difference.
Btw, if you want to lower CPU usage, stay away from conversions involving type casts from char to numeric/date and vice versa.

Dieter
Post #11128
« Prev Topic | Next Topic »


Reading This Topic Expand / Collapse
Active Users: 0 ( 0 guests, 0 members, 0 anonymous members )
No members currently viewing this topic.


All times are GMT -5:00, Time now is 6:43pm

Powered By InstantForum.NET v4.1.4 © 2008
Execution: 0.031. 11 queries. Compression Disabled.