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 474959
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T00:20:26+00:00 2026-05-13T00:20:26+00:00

I feel dumb right now. I got to update 100.000 rows on a database

  • 0

I feel dumb right now.

I got to update 100.000 rows on a database that i don’t have direct access to. The total row count of the table is roughtly 500.000 rows.
The update just adds one caracter to a field in case it’s length is < 3. So Basically:

UPDATE X SET VALUE = ‘0’||VALUE WHERE LENGTH(VALUE) < 3

So i send this update to the DBA’s and they return it to me saying that the statement has too much performance cost (because the full access table and the 100k commit)
and that i should write a proces instead. And then they provide me a code example, in case i don’t know how to make one.

I say WTF, how a process would ever run faster than a single update statement? Afer doing doing some tests, my update takes 30 seconds to run,
the process, following their code example, takes 10 minutes.

So the real question, after all this frustation, is: Is there any way to avoid the full acces table when using such a function in the where clause? (the column is indexed)

  • 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-13T00:20:26+00:00Added an answer on May 13, 2026 at 12:20 am

    Your statement is already optimized. It is set-based and queries the table in the most efficient way possible (Full Table Scan). You won’t be able to write a program that does the same work with less resources / time. You CAN write a program that performs poorly, that is non-restartable in case of error (ie: commit every 100 rows) and will monopolize more resources.

    Follow Tom Kyte’s mantra:

    • You should do it in a single SQL statement if at all possible.
    • If you cannot do it in a single SQL Statement, then do it in PL/SQL.
    • If you cannot do it in PL/SQL, try a Java Stored Procedure.
    • If you cannot do it in Java, do it in a C external procedure.
    • If you cannot do it in a C external routine, you might want to seriously
      think about why it is you need to do it
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I feel that my shop has a hole because we don't have a solid
I feel pretty dumb at the moment, but for several days now, I have
I feel so dumb right now: moveSequence look(COORD xyBeatle, fieldd &field); what could be
I feel really dumb for asking this question, but here it goes. I have
I'm stuck writing a simple form...I feel dumb. Here's my controller: function welcome_message(){ //Update
Possible Duplicate: Integer summing blues, short += short problem I feel dumb that this
I'm pretty sure that I'm going to feel really dumb when I remember how
I've been searching for about an hour now, I already feel kinda dumb. Where
i feel dumb for asking this but i have been fighting with this for
Ok, This seem so simple that I feel kind of dumb for asking, yet

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.