Database Administration (MOSC)

MOSC Banner

re-write a database query

Hi,

Can the following query re-written in such a way to become more efficient?

Table A has two indexes: A_C4 on C4 NONUNIQUE

  PK_A on C7 UNIQUE

Table B has one index: PK_B on C7 NONUNIQUE



SELECT UNIQUE A.c1,A.c2,A.c3,A.c4,A.c5,B.c6,A.c7,A.c8,A.c9,B.c10,B.c11

FROM A A ,B B WHERE A.c7 = B.c7

AND A.c8 = B.c8

AND A.c8='ACT' AND A.c4 IN

('J1','J2','J3','J4','J5','J6') ORDER BY c7 DESC;

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