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
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?

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
Messages: 24958
Registered: January 2009
Location: SoCal
Senior Member
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
Messages: 3724
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: Sun Oct 23 11:34:19 CDT 2016

Total time taken to generate the page: 0.05415 seconds