- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Slow parallel query on Oracle
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-03-2003 07:05 PM
тАО11-03-2003 07:05 PM
Slow parallel query on Oracle
I'm using oracle 8.1.6 on HP-UX 11.11.
I'm trying to do parallel query and tried something like
select /*+ parallel(AAA, 4) count(*) from AAA;
It worked and query process spreaded out on 4 cpus.
However, it's slow! It's slower than it is on single query. I'm wondering why.
I saw an explanation somewhere that parallel query doesn't use buffer cache but physical access. Is it true?
Each query process doesn't use cpu enough and cpus are almost idle.
I assigned 1GB buffer cache so that data of table AAA should be in buffer cache.
Does anyone have any idea?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-03-2003 07:28 PM
тАО11-03-2003 07:28 PM
Re: Slow parallel query on Oracle
Your query is doing a full table scan of AAA and will be disk bound. You need to find a more practical real life example. Partitioned tables are always good for this, you can get a separate query process for each partition.
-- Graham
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-04-2003 12:45 PM
тАО11-04-2003 12:45 PM
Re: Slow parallel query on Oracle
Is your tables striped across multiple disks ?
Note : parallel execution will not be efficient if you just have multiple cpus, the data should also be in multiple disks, so io's are processed concurrently by multiple processes.
your problem looks like an io contention. look at v$session_event, v$session_wait and see whats its waiting for.
-
hth,
Stan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-05-2003 04:32 PM
тАО11-05-2003 04:32 PM
Re: Slow parallel query on Oracle
I attached sql trace. It seems no physical acccess occurred during fetch phase.
I'm not sure how to evaluate this sql trace.
Can anyone help?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-05-2003 04:37 PM
тАО11-05-2003 04:37 PM
Re: Slow parallel query on Oracle
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-05-2003 05:42 PM
тАО11-05-2003 05:42 PM
Re: Slow parallel query on Oracle
-
Stan: this is a text file -> a tkprof output
-
Indeed it is doing a full scan on the table. The value of the ELAPSED time when compared to the CPU time only means that you spent a lot of time waiting for something. A sQL query that performs lots of physical disk I/O might have lots of wait time for I/O to complete.
-
You may use your raw trace file to determine the cause of the wait!
-
hope this helps!
regards
Yogeeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-10-2003 04:05 PM
тАО11-10-2003 04:05 PM
Re: Slow parallel query on Oracle
I finally found what was causing this.
I just created tablespace with multiple data files then parallel worked ok.
It's effective now.
These data files are not spreaded among different disks but on the same disk.
I guess probably parallel query is exeuted based on extent and these extents have to be on different files.
Thanks for all yor replies.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-10-2003 04:15 PM
тАО11-10-2003 04:15 PM
Re: Slow parallel query on Oracle
Good that you fixed the problem. look at the note i had mentioned earlier in this thread.
"Note : parallel execution will not be efficient if you just have multiple cpus, the data should also be in multiple disks, so io's are processed concurrently by multiple processes" This should have given you an hint.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-10-2003 04:52 PM
тАО11-10-2003 04:52 PM
Re: Slow parallel query on Oracle
I re-read your post, you say multiple datafiles but still on one single disk gave you good performance than before. Did you change anything else other than creating tbs with multiple datafiles. Are you sure the volumes aren't striped across multiple disks ?
AFAIK, "parallel query is exeuted based on extent and these extents have to be on different files." thats not the case.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-12-2003 11:02 AM
тАО11-12-2003 11:02 AM
Re: Slow parallel query on Oracle
select /*+ parallel(AAA, 4) */ count(*) from AAA;
2. Generally, a "count(*)" will want to use an index. This option might work better for your test.
select count(*) from
(select /*+ parallel(AAA, 4) */ * from AAA);
Thanks,
Brian
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-12-2003 04:40 PM
тАО11-12-2003 04:40 PM
Re: Slow parallel query on Oracle
The data is in cache and there is no physical access anyway.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-12-2003 05:42 PM
тАО11-12-2003 05:42 PM
Re: Slow parallel query on Oracle
foremost, parallel slaves do direct reads to fetch data, it doesn't rely on buffer cached data. now, you say there is no phyiscal io.
do this and attach the trace file it generates.
alter session set events '10046 trace name context forever, level 8';
run your parallel query;
alter session set events '10046 trace name context off';
you can find the trace file under udump directory.
This is should help to clear things once for all.