Skip to Main Content

sql to split total time taken into chunks

3264939Aug 30 2018 — edited Aug 31 2018

Hello,

Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

I have a process that runs lots of similar jobs (for this example 8) and every time this process runs, it stores the time taken for each job in seconds.  I am going to split this process into 4 chunks and would like to assign a 'chunk' number to each job so that each chunk will a quarter of these jobs

JOB NAME
TIME IN SECONDS
ASSIGNED CHUNK NUMBER
JOB 1801
JOB 2702
JOB 3603
JOB 4504
JOB 5404
JOB 6303
JOB 7202
JOB 8101

Is there anyway I can assign these chunk numbers dynamically using sql (assigned chunk number) so all the chunks estimated time will be pretty similar? so in the above example each 'chunk' will take 90 seconds?

Cheers,

Da

This post has been answered by mathguy on Aug 30 2018
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked due to inactivity on Sep 28 2018
Added on Aug 30 2018
15 comments
685 views