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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T19:37:00+00:00 2026-05-30T19:37:00+00:00

I have a PHP application that pulls order information based on a scanned/entered order

  • 0

I have a PHP application that pulls order information based on a scanned/entered order number for order pulling purposes. We’re using Pervasive SQL but syntax is identical to MS SQL.

I have a couple of smaller queries used to break kit items down into component items that are called as needed, but they’re simple and fast to execute. My problem is our main query that most needed information is stuffed into. It’s fast for most orders since they’re relatively small (1-15 items or so). My problem is with large orders (e.g. wholesale) that may end up being 100+ items.

I realize that the more information needed the longer it will take to execute a query, but I’m hoping there is room in my query to optimize it further.

Does anyone see anything in the following query that I can optimize to speed things up for large orders?

SELECT 
    oeordh.orduniq, 
    oeordh.customer, 
    oeordh.ordnumber, 
    oeordh.orddate, 
    oeordh.salesper1, 
    oeordd.orduniq, 
    oeordd.item, 
    oeordd.pickseq, 
    oeordd.location, 
    oeordd.origqty, 
    arcus.idcust, 
    arcus.idgrp 

FROM oeordh 
    INNER JOIN oeordd ON oeordh.orduniq = oeordd.orduniq
    INNER JOIN arcus ON oeordh.customer = arcus.idcust

WHERE 
    oeordh.ordnumber = '".$_POST['barcode']."' 

ORDER BY oeordd.pickseq`
  • 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-30T19:37:01+00:00Added an answer on May 30, 2026 at 7:37 pm

    You can’t get it better than that, check that every value you look up on (including joins) have indices and that you don’t run a query for every item, make sure you request all the items (that are pertinent to the current page) at the same time and then process them on the client side.

    Basically, it’s not a query issue, it’s either your code that uses the query results or the database design (or the network, but that’s most likely beyond your control).

    I feel I should mention the glaring security hole in that line of code also, but I’m sure you get that a lot.

    Edit: I actually thought of something, if those fields aren’t varchar, you should rtrim() them on the server side instead of sending thousands and thousands (or more) of spaces at the end of every column.

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

Sidebar

Related Questions

I have a PHP application that sends email using the pear Mail function. Unfortunately
I have a PHP-based web application that monitors the status of a process and
I have a PHP Web application that consumes a Web Service using PHP's native
I have a PHP application that displays a list of options to a user.
I have a PHP application that will on occasion have to handle URLs where
I have a PHP application that makes extensive use of Javascript on the client
I have a php application that is installed on several servers and all of
I have a php web application that uses big cookies to store a lot
We have a PHP/MYSQL application that collects user input, including special characters like ø,ü,ñ,
I am writing a PHP application that will have the ability to edit settings

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.