SQL Performance (MOSC)

MOSC Banner

Select query with column names takes longer

edited Sep 8, 2015 10:08AM in SQL Performance (MOSC) 2 commentsAnswered

Hi Gurus,

If I am doing a select like:

Select * from table1 where a in (select b from table2 where c||d='x1234');

It takes .22 ms time, which is great. Both c and d columns have indices.

But if I run:

Select m, n from table1 where a in (select b from table2 where c||d='x1234');


It takes nore than 1 min if I only want columns m & n of the same table. Can you please help me understand why so?


Thanks

Samrat

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center