sql - Oracle 10g Full table scan(parallel access) 100x times faster than index access by rowid -
The product had a query that was running for several hours (5-6) hours. I looked into its execution plan, and found that it was ignoring parallel signs on a large table. Reason - This index was using table access by ROWID. So when I added a / * + full (huge_free) * /
signal before the parallel (huge_free)
sign, the query began to run in parallel, and it was less Finished in less than 3 minutes. I could not understand, for this reason, the performance of the huge difference could be the benefit of parallel FTS:
- If you have more useless If CPUs are then parallel operation is naturally fast.
- Parallel operation in 10g direct I / O bypass buffer cache, which means "buffer is busy waiting" or there is no risk of any other dispute for buffer cache.
Make sure that there are the above benefits, but then the following losses are still there:
- Parallel actions still need to be I / O, and Whatever it is for us to access in the table, it will be as much as the whole table scan and expensive (all reads physically)
- Parallel operations are not very scalable, which means That is, if there are not enough resources, it will slow down
Hands with the above knowledge, I see only one reason that could cause poor performance of the query when this index was used by the ROEDID - "Wait a busy buffer Like "some kind of dispute but this ARUR does not appear at the top 5 wait events. The top two events were "DB File Sequentially Read" and "DB File Scattered Reading". Is there anything else that has missed me to take into consideration? Please highlight me.
First of all, without knowing anything about your data versions, statistics, selectivity of your predictions , e.t.c. I suppose that instead of trying to use an index that's a big benefit you're seeing, by scanning a table, the index is not necessarily fast and table scans are not necessary. If you are using an array from an index to reach a line, then Oracle is limited to reading a single block (reads in sequential oracle terms) and it will be read several times a block if many in the block There are rows. A full table scan, on the other hand, reads good, efficient multiballak (read scattered in the words of Oracle). Of course, reading a single single block is going to be more efficient than reading a single multiball, but the reader is as much skilled as Multiballock, so the bite is read efficiently. In addition, if you are using an index, you will need to read several blocks from the index periodically to know the next line to read from the table.
You do not really need to read as much data as before the table. A table scan is more efficient than an index. Based on many other factors, the tipping point is probably in the 10-20% range (this is a very, very difficult estimate). Imagine that you had to get a bunch of phone book names and there was an index in the phone book in which the information was included on which you are filing and the page on which the entry is on. You can use the pointer to find the name of a person you want to see, flip the indicated page, record the information, flip back into the index, find the next name, flip back, etc. Or you can just start the first name, unless you get the name of interest, scan, record the information, and continue the scan. It does not take much time before ignoring index and getting better by reading from the table.
Adding equality does not decrease the amount of work you do in your query (in fact, adding parallel to query coordinates means that you are doing more work). It's just that you're doing that job in a short period of time, using the available resources of the server. If you are running a query with 6 parallel slaves, which can definitely allow the query to run at a total of 5 times faster (parallel queries clearly linearly due to overheads slightly). If this is the case, then you expect that the scan of the table was made 20 times faster by scanning the table and adding another aspect of 5 to add a similarity to its 100x improvement.
Comments
Post a Comment