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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T12:51:13+00:00 2026-05-25T12:51:13+00:00

Our code is written in C and DB is Informix. We are doing some

  • 0

Our code is written in C and DB is Informix.
We are doing some code optimization in ESQL program and found the following query:

UPDATE [TABLE] SET [PRIMARY KEY COLUMN] = [NEW KEY] WHERE COL = ? OR COL = ? …

The number of columns in the where clause is dynamically prepared. We have an upper count check to stop preparing the where clause and do an update, then come back and start preparing the remaining. The UPPER_MARK is “30”

if ( where_parameter_count >= UPPER_MARK )
__ execute update__
__ clean_and_continue; /* start prepare again */__

We thought of replacing the WHERE .. OR with WHERE … IN

UPDATE [TABLE] SET [PRIMARY KEY COLUMN] = [NEW KEY] WHERE COL IN (?, ? …)

Will this be faster than “where or”?

  • 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-25T12:51:13+00:00Added an answer on May 25, 2026 at 12:51 pm

    Either syntax resolves down to the same thing as far as the Query Optimizer is concerned. It won’t make any difference.

    The only advantage to the in-list approach is that adding additional predicates won’t change the logic, i.e.

    x IN (a, b) AND y = z
    

    and

    x = a OR x = b AND y = z
    

    are NOT the same thing.

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

Sidebar

Related Questions

I have some code I've written in PHP for consuming our simple webservice, which
We’ve found that the unit tests we’ve written for our C#/C++ code have really
i'm wondering about this possibility. Is it possible to make our code written in
Our website code is written in PHP. We have very little testing in regards
In our application, I have seen code written like this: User.java (User entity) public
Our code was written based on the example from Google Gears' own docs. We're
Our team is willing to unit-test a new code written under a running project
We're having an issue. We have the majority of our code written in .net
I have the following snippet of code written in C#: openFileDialog1.InitialDirectory = \\\\fwm-storage\\users\\ +
Bumped into some code like this in our code base... which made me worried.

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.