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

Problem I have some pages that need dynamic data from website to generate output
I have to generate about a million random trips between about 40K destinations. Each
I have a denormalized table product with about 6 million rows (~ 2GB) mainly
At work, I have a large table (some 3 million rows, like 40-50 columns).
I have to generate some random data, but from Regular Expression given. For example
I have a .NET console application that needs to generate some HTML files. I
I have an XSD file which is used to generate some objects which are
I have this in my controller. I need my view to generate some HTML,
I have some php files in a server which generate xml code in them.
I have some XML files which are used to generate my webpages, however I

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.