Home » RDBMS Server » Performance Tuning » SQL code block running v.v.v. slow
SQL code block running v.v.v. slow [message #173417] Mon, 22 May 2006 06:56 Go to next message
blazingrock4u
Messages: 30
Registered: March 2006
Location: India
Member

select T1.col11,
T1.col12 ,
T2.col21,
T3.col31,
T3.col32,
from table2 T2,
table3 T3,
table1 T1
where T2.col21 = T3.col33
and
T1.col13 = T2.col23

no indexes on Table1, Table3.


Table1=1lac rows
Table2=58lac rows
Table3=58 lac rows
Re: SQL running v.v.v.slow [message #173421 is a reply to message #173417] Mon, 22 May 2006 07:32 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
The results set is a carestian join against Table1; since is not included in the WHERE clause
Re: SQL code block running v.v.v.slow [message #173433 is a reply to message #173417] Mon, 22 May 2006 07:56 Go to previous messageGo to next message
Frank Naude
Messages: 4581
Registered: April 1998
Senior Member
Creating some indexes on the join predicates will most certainly help.

BTW: What is "lac"?
Re: SQL code block running v.v.v.slow [message #173441 is a reply to message #173433] Mon, 22 May 2006 08:09 Go to previous message
Art Metzer
Messages: 2480
Registered: December 2002
Senior Member
Lac, also spelled "lakh", is a measurement equivalent to a hundred thousand (1E5). The term is most commonly used in India.

Here's a Wikipedia article on the subject ("Indian numbering system").
Previous Topic: hint : use of an index Ora 10g
Next Topic: error capturing
Goto Forum:
  


Current Time: Sat Nov 23 15:26:27 CST 2024