0 - 2 of 2 tags for data type conversion in joins...

Hi All
 

SELECT 

TRIM(UPPER(ABC.HELLO) as HELLO1

FROM ABC

JOIN DEF

HELLO1=DEF.HELLO

 

SELECT 

ABC.HELLO

FROM ABC

JOIN DEF

TRIM(UPPER(ABC.HELLO))=DEF.HELLO

 

Will there be any difference in performance ??

 

Thanks in Advance !!

Hi All,

I have seen in most of the SQLs having Type cast conversion from varchar to interger and date to integer while processing from staging to next layer..

Code looks like:

from
stg_party
Left join sys_calendar.calendar
on cast(khrdt as integer)=cast(calendar_date as integer)

This impact CPU is in 4 digits everyday for retrieving the data from the table..

I am expecting a suggestion to avoid this type of data type conversion in the Joins and how optimizer will take this query for processing and overhead of this type of query?