Home > Ask the Oracle Experts > Database Design and Architecture Questions & Answers > In Oracle, does the number of columns in a table affect the performance during SELECT/INSERT/UPDATE?
Ask The Oracle Expert: Questions & Answers
EMAIL THIS

In Oracle, does the number of columns in a table affect the performance during SELECT/INSERT/UPDATE?

Brian Peasland EXPERT RESPONSE FROM: Brian Peasland

Pose a Question
Other Oracle Categories
Meet all Oracle Experts
Become an Expert for this site


Oracle tips, scripts, and expert advice
Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


>
QUESTION POSED ON: 14 May 2008
Does the number of columns in a table affect the performance during SELECT/INSERT/UPDATE? If so, is there any reason?

>
EXPERT RESPONSE
For SELECT statements, the number of columns will not affect the performance. The reason is that Oracle has to read data at the block level. The entire row, or multiple rows if the block contains more than one, will be read into the buffer cache. Oracle will first determine which rows satisfy your query. At this point, Oracle removes the unwanted rows from the result set before it passes the results back to the user. So whether you have one column or all columns from a table in a SELECT statement, it will not affect the statement's performance.

Similarly for an UPDATE statement. Oracle must read the entire block into memory and then modify the row's contents. If the row increases in length due to the UPDATE statement and the row has to be migrated or chained, the statement will take longer to process. But this is true no matter how many columns are modified. Finally, it will be quicker to update all columns at once than to break the statement into multiple UPDATE statements.

The INSERT statement can take longer to complete the more data you insert. This has to do with the entire row length rather than the number of columns involved. But you shouldn't see any noticeable difference involved. If your INSERT statement is taking a long time, there are probably other factors at work.


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


RELATED CONTENT
Database Design and Architecture
Oracle error 942 when exporting a schema
Using exp and imp for Oracle Database when switching platforms
Can I populate tables in MS ACCESS and upload to the Oracle server?
User vs. schema in Oracle
Is there any tool to migrate data from DB2 to Oracle?
Does making an Oracle datafile READ ONLY after a backup change the file?
I have space in log_arch_dest, so why am I getting the ORA-00257 error?
Why am I receiving the ORA-12535 error when using a remote database?
Partitioning a table in Oracle to improve performance
How to set up a job for an SQL query in Oracle 10g Grid Control

Oracle database administration (DBA)
Which backup strategy should I use for my Oracle 10g database?
Oracle error 942 when exporting a schema
How to use the FTP for Oracle import
How to restore a database using RMAN to Point in Time
Cold backups after SHUTDOWN ABORT
Installing Oracle homes when upgrading
ORA-06550 error when importing a 10.2 dmp file into a 9.2 database
Can I populate tables in MS ACCESS and upload to the Oracle server?
User vs. schema in Oracle
Why am I receiving the ORA-12535 error when using a remote database?
Oracle database administration (DBA) Research

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary



Search and Browse the Expert Answer Center
Search and browse more than 25,000 question and answer pairs from more than 250 TechTarget industry experts.
Browse our Expert Advice

HomeNewsTopicsTipsAsk the ExpertsMultimediaWhite PapersProductsBlogs
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides enterprise IT professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective IT purchase decisions and managing their organizations' IT projects - with its network of technology-specific Web sites, events and magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Reprints  |  Site Map




All Rights Reserved, Copyright 2003 - 2008, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts