Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3243058
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T18:23:17+00:00 2026-05-17T18:23:17+00:00

I have to generate some million update from some table, to update themselves. I

  • 0

I have to generate some million update from some table, to update themselves. I had just recently learned about parallel(tablename,threads) which really improved the performance in PLSQL developer when I had run something like this:

select /* + parallel(table1,100) parallel(table2,100) */
       'update table1 set id = 1 where ... and id = '||table1.id||' ...
where ...

(I’m doing it like this, because it gives me the backup data in the update. And my BOSS told me to do it like this ;-))

So it really worked fast when using a static number in the set id = 1 part and in PLSQL Developer.

But then I wrote it to a file, and inserted a create sequence before, and tried to use the sequence as follows:

create sequence myseq
 start with   4200000
 increment by 1
 maxvalue     11200000;


select /* + parallel(table1,100) parallel(table2,100) */
       'update table1 set id = '||myseq.nextval||' where ... and id = '||table1.id||' ...
where ...

But now it’s terribly slow. And I don’t know why. I just rewrote the update generator, to insert static data in there, and used awk to replace that with a sequence of numbers, but could someone explain what had caused this (and can I do something about it)?

Thanks in advance!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T18:23:18+00:00Added an answer on May 17, 2026 at 6:23 pm

    Sequences can be quite a bottleneck, especially when multiple sessions/threads are using them at once.

    The main thing you can do to improve this is to increase the number of sequence values that are cached: ALTER SEQUENCE CACHE n, replacing n with a value greater than 20 (the default). I would suggest setting it much higher since you will be using many or all of the sequence values in one statement. You can go as high as (CEIL (MAXVALUE - MINVALUE)) / ABS (INCREMENT).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a denormalized table product with about 6 million rows (~ 2GB) mainly
I am trying to generate some beans from several xsd's. Unfortunately they all have
At work I work closely with MS-Office. I have managed to generate some scripts
I have a task and I want to generate some code using the CodeDom.
i have several common elements (components), that will generate some html. it seems my
I have a Java string of XML content. I use Velocity to generate some
I have some very simple code to generate an assembly and invoke a method
I'm trying to generate a JSON response that includes some HTML. Thus, I have
I have a PHP-generated page which is displaying some data about a set of
I have a process that's going to initially generate 3-4 million PDF files, and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.