简体   繁体   中英

Why does parallel hint not work even if there is a parallel hint?

I tried to use 'PARALLEL'hint for the first time, but when I saw the execution plan, parallel processing didn't happen.

Here is the code and execution plan.

SELECT /*+ PARALLEL(SCORE 4) */
        *
FROM SCORE;

在此处输入图像描述

I learned that if parallel processing happens successfully, 'PX COORDINATOR'operation has to be written in an execution plan, but as you can see in the image, there is no 'PX COORDINATOR'operation.

In this situation, why does parallel processing not happen even if I wrote the parallel hint?

And how can I make parallel processing happen succesfully?

If you give me some advice, I'll really appreciate it.

(I'm using oracle 11g.)

What edition are you using? XE does not have access to parallelism (which is sensible given in 11g XE can only use a single core anyway).

The latest version 18c XE can use two cpu cores but the parallelism restriction remains. Luckily, your query probably won't benefit much by parallelism - the table is small so is quick to read and the data transfer to the client will need to be single threaded anyway (otherwise you need multiple client connections).

For 2601 (expected) rows it is not worth to process the query in parallel. Splitting the query, running in parallel and combine results afterwards would take longer.

Apart from that, Oracle has to know where and how to split the operation. Do you have any index on this table? If not, how can Oracle know where the operation could be split for parallel processing?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM