Home » RDBMS Server » Performance Tuning » Table size and sql performance
Table size and sql performance [message #360737] Sun, 23 November 2008 17:47 Go to next message
djeevan
Messages: 1
Registered: November 2008
Junior Member
How does the table size effects sql performance?

I am comparing 2 tables , with same number of rows(54 million rows) ,

table1(columns a,b,c,d,e,f..) has 40 columns

table2 (columns (a,b,c,d)

SQL uses columns a,b.

SQL using table2 runs in 1 sec.

SQL using table1 runs in 30 min.


Can any one please let me know how the table size , number of columns in table efects the performance of SQL's?


Thanks
jeevan.
Re: Table size and sql performance [message #360744 is a reply to message #360737] Sun, 23 November 2008 19:07 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
http://www.orafaq.com/forum/t/88153/0/
Please read & follow Posting Guidelines as stated in URL above.

Do NOT cross/multi-post!
Re: Table size and sql performance [message #360745 is a reply to message #360744] Sun, 23 November 2008 19:34 Go to previous message
rleishman
Messages: 3728
Registered: October 2005
Location: Melbourne, Australia
Senior Member
Oracle stores rows in BLOCKS. The smallest piece of data that Oracle can read or write is a BLOCK, which may contain many rows.

If you rows are bigger, fewer rows will fit into a block. Even though the two SQLs read the same number of rows, one will read more blocks and therefore be slower.

Ross Leishman
Previous Topic: INIT.ORA parameters to SCALE UP INSTANCE
Next Topic: Index
Goto Forum:
  


Current Time: Fri Jun 28 01:26:21 CDT 2024