Home > Ask the Oracle Database / Applications Experts > Oracle database design and architecture Questions & Answers > Partitioned vs. non-partitioned tables
Ask The Oracle Expert: Questions & Answers
EMAIL THIS

Partitioned vs. non-partitioned tables

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: 28 March 2006
I'm attempting to address some performance issues by using list partitioning. As an experiment I created two small tables (with about 1,000 rows) of vehicle maintenance data, one with no partitions and the other partitioned by vehicle type:
create table myschema.mynewtable
tablespace mynewtablespace
parallel ( degree default )
nologging
monitoring 
partition by list (vehicle_type) (
partition TRUCK values ('truck'), 
partition CAR values ('car'),
partition SUV values ('suv'), 
partition VAN values ('van')) as
select * from myschema.myoldtable;
The problem is that queries into the partitioned table take approximately twice as long to complete as compared to the non-partitioned table. Am I missing something here? Thanks in advance!

>

Queries on a partitioned table will perform faster if your query can benefit from partition pruning. Partition pruning is when Oracle automatically removes partitions from consideration when processing your query. Using your example above, the following query will benefit from partition pruning:

SELECT * FROM myschema.mynewtable
WHERE vehicle_type IN ('van','car');

In this case, only the partitions CAR and VAN will be scanned. The other partitions will never be read since they do not contain values that can possibly be returned by the above query. However, the following query will not utilize partition pruning:

SELECT * FROM myschema.mynewtable
WHERE vehicle_age > 2;

In this query, it is possible that all partitions will contain a vehicle more than two years old.

Partitioning tables should start with a good analysis of the queries that most often use the table. If you rarely query the VEHICLE_TYPE column in the WHERE clause, then the partitioning above will not help your performance that much.

Aside from the above information, you will want to see how your query is being executed by the Optimizer. You will want to run EXPLAIN PLAN on the query to see the operations the Optimizer is performing to return your query's results.


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



RELATED CONTENT
Oracle database design and architecture
How to use V$SEGMENT_STATISTICS to find the most accessed Oracle table
Can I install an Oracle client on Windows 7?
How to use the Oracle Database Upgrade Assistant (DBUA)
Can I specify Oracle column order in my database table?
Can I have a single Oracle 11g RAC instance across multiple databases?
How to use the Oracle export utility to duplicate database structure
How to choose the primary key columns in an Oracle table
Understanding the data archiving definition
How to plan Oracle Grid Control Repository maintenance
What Linux flavor should I use for my Linux proof of concept in Oracle?

Oracle database design and architecture
How to use V$SEGMENT_STATISTICS to find the most accessed Oracle table
Can I install an Oracle client on Windows 7?
How to use the Oracle Database Upgrade Assistant (DBUA)
Can I specify Oracle column order in my database table?
Can I have a single Oracle 11g RAC instance across multiple databases?
How to use the Oracle export utility to duplicate database structure
How to choose the primary key columns in an Oracle table
Understanding the data archiving definition
Review: Oracle's 11g R2 database has some good and bad
Scaling an Oracle database: What is the best strategy for you?

Oracle database performance problems and tuning
Oracle releases new database, says 11g upgrade will cut costs
Oracle raises prices on database management packs
Oracle New Year's resolutions, part 1: Advice for navigating 2009
Solving common Oracle errors guide
Oracle 11g data compression
Varchar or number for better performance?
Do statistics on SYS-owned objects hurt performance in 10g?
Inside the Oracle 11g SQL Performance Advisor, part 1
Inside the Oracle 11g SQL Performance Advisor, part 2
Difference between driving table and driver table in Oracle

RELATED GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
E. F. Codd  (SearchOracle.com)
extent  (SearchOracle.com)
flexfield  (SearchOracle.com)
foreign key  (SearchOracle.com)
multidimensional database  (SearchOracle.com)
object-oriented database management system  (SearchOracle.com)
quad tree  (SearchOracle.com)
relational online analytical processing  (SearchOracle.com)
row  (SearchOracle.com)
splay tree  (SearchOracle.com)

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



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

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




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