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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T09:45:20+00:00 2026-05-23T09:45:20+00:00

I have tried running the following UPDATE on a table with about 25k rows

  • 0

I have tried running the following UPDATE on a table with about 25k rows and its been running for over 24hours and it has not completed. I only need to run this UPDATE once so time is not too much of an issue, but anything that long is just not going to work for me. The UPDATE statement does work as I have tried running it in isolation on just a few records, but when you apply it over the full table is when it bogs down.

Im certain that the LIKE is causing the slow down, but I do not have any idea how to make this any simpler or faster, any clues would be appreciated:

UPDATE INVENTORY i2

SET i2.BVRTLPRICE01 =

(SELECT i1.BVRTLPRICE01 FROM INVENTORY i1

WHERE 

i1.CODE = REPLACE(LEFT(i2.CODE,1), 'S', 'C') + SUBSTRING(i2.CODE,2,LENGTH(i2.CODE)))        

WHERE 

i2.CODE like 'S%'
  • 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-23T09:45:21+00:00Added an answer on May 23, 2026 at 9:45 am

    I’ve only worked with Pervasive once or twice, but I can’t imagine that the engine is that horrible that the problem would be a simple LIKE as you have it. The issue is more likely the subquery.

    I would try this instead:

    UPDATE
        I2
    SET
        BVRTLPRICE01 = I1.BVRTLPRICE01
    FROM
        INVENTORY I2
    INNER JOIN INVENTORY I1 ON
        I1.CODE = REPLACE(LEFT(I2.CODE, 1), 'S', 'C') +
                  SUBSTRING(I2.CODE, 2, LENGTH(I2.CODE)))
    WHERE
        I2.CODE LIKE 'S%'
    

    Also, make sure that you’re only joining on one row from I1 and not getting many rows for each row in I2.

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

Sidebar

Related Questions

i have tried to get the sine wave example running on an AsioOut, but
Iam running WAMP server and just enabled php_memcache extension and have tried the code
I have tried this but it does not work (even if I specify .wav
i have tried till my head hurts and have been reading so much my
LATEST Update (Nov 2 2011 9AM) I tried running tnsping from the service and
I have a strange problem. I convert a date using the following CONVERT(varchar(64), table.[Date],
I have some code like the following that I'm running in a debugger in
i have a postgres database with millions of rows in it it has a
In an table I have the following. ParameterID (int) ParameterValue (XML) ------------ -------------- 1
I have a table with 92 million rows. I have a list of 4000

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.