Friday 15 January 2010

sql - Where clause is slowing my query from 2 seconds to 24 seconds -


I am trying to write a simple question to count the results from a large table. DM.DM_CUSTOMER_SEG_BRIDGE_CORP_DW AL3 WHERE (AL3.REFERENCE_YEAR (+) = 2012) Select COUNT (*)

to return output to me above the query It takes about 24 seconds if I remove it and execute the same question, then I'm giving results in 2 seconds.

I know what is the reason for this I am relatively new to SQL queries.

Please help

thanks, new

An index may be required, usually you will need an index on any column used for (+) syntax

, I think it is unnecessary (I use the Oracle Not an expert), but see

No comments:

Post a Comment