Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

DBMS_PARALLEL_EXECUTE.create_chunks_by_rowid - clarification needed

BEDEOct 25 2017 — edited Oct 25 2017

When it comes to dbms_parallel_execute.create_chunks_by_number_col, and the number column is a primary key, usually generated by a sequence, I understand how that comes. Considering there would not be large intervals of the sequence that would be "lost", the chunks will most likely have equal sizes (as I have actually seen).

But how come the chunks by rowid?

So, in the example at https://oracle-base.com/articles/11g/dbms_parallel_execute_11gR2#create_chunks_by_rowid I find:

l_sql_stmt := 'UPDATE test_tab t

  SET t.num_col = t.num_col + 10,

  t.session_id = SYS_CONTEXT(''USERENV'',''SESSIONID'')

  WHERE rowid BETWEEN :start_id AND :end_id';

How is this to be? As far as I know, the rowid represents info about datafile number, block number and row number in some number base. But, between a rowid_from and a rowid_to there may well be found data blocks belonging to different objects, and not only to the table I would like to scan and perform some procedures for each of its rows. That would mean that the procedure DBMS_PARALLEL_EXECUTE.create_chunks_by_rowid should be really smart so that it would create chunks containing a comparable number of rows. Not like one chunk of 10,000 rows and another one of 100,000. Doesn't it sometimes produce very different chunk sizes?

I'm not sure how I could perform some tests that would answer this question.

This post has been answered by padders on Oct 25 2017
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 22 2017
Added on Oct 25 2017
7 comments
1,947 views