Solved

Hash Partition

Posted on 2011-03-16
3
422 Views
Last Modified: 2012-05-11
If I have a table with 45 columns what critera should I use to determine which columns to include in the partition by hash clause?
0
Comment
Question by:msimons4
  • 2
3 Comments
 
LVL 11

Accepted Solution

by:
Akenathon earned 500 total points
ID: 35149653
You might be confusing hash partitioning methods with a hash cluster. What's your goal? Why are you choosing partitioning? Which business need are you trying to accomplish?
0
 

Author Comment

by:msimons4
ID: 35150132
I am trying to speed up full table scans. I thought when you hash partition a table you select which columns you want to partition:

CREATE TABLE invoices
(invoice_no    NUMBER NOT NULL,
 invoice_date  DATE   NOT NULL,
 comments      VARCHAR2(500))
PARTITION BY HASH (invoice_no)
(PARTITION invoices_q1 TABLESPACE users,
 PARTITION invoices_q2 TABLESPACE users,
 PARTITION invoices_q3 TABLESPACE users,
 PARTITION invoices_q4 TABLESPACE users);

in this case: PARTITION BY HASH (invoice_no)
If I have 45 columns what do I base which columns to PARTITION BY HASH
0
 
LVL 11

Assisted Solution

by:Akenathon
Akenathon earned 500 total points
ID: 35151840
You won't speed up FTSs by hashing. On the contrary, (any kind of) hashing is useful when you are looking for exact matches.

If your table is big, you should aim to avoid FTSs and do indexed (or hashed) accesses. What's the query you'd like to speed up? Does it absolutely need a FTS? Prove it and we can talk about speeding up FTSs if you have no choice...
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

How to Unravel a Tricky Query Introduction If you browse through the Oracle zones or any of the other database-related zones you'll come across some complicated solutions and sometimes you'll just have to wonder how anyone came up with them.  …
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
This video shows how to recover a database from a user managed backup
This video shows how to configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now