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

  • Home
  • SEARCH
  • 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 7062845
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T04:38:35+00:00 2026-05-28T04:38:35+00:00

I have a problem where I need to store Amazon.com’s order numbers into a

  • 0

I have a problem where I need to store Amazon.com’s order numbers into a MySQL table. Amazon.com order numbers are composed of numbers and hyphens, like 102-1234567-1234567 (17 numbers and 2 hyphens). I’ve seen this “number” stored as a string because of the hyphen in some instances, and, subsequently, a search on this column is a string search instead of a numerical search.

Right now, I’m just storing them as VARCHAR(19), but is there a way to store this so that it’s more efficient and faster in storing and retrieving? For example, I thought about parsing each numeric segments into one column of its own (3 columns total for one order “number”) and doing ... WHERE colA=102 AND colB=1234567 AND colC=1234567 to pull up a particular order, instead of doing ...WHERE col LIKE '102-1234567-1234567'. I know the former uses a lot less bytes, but is that also faster? The table I’m working on has over 100K rows and it grows by a tiny fraction every day.

Any suggestions or comments on how I should modify the structure or how I shouldn’t? TIA!

  • 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-28T04:38:35+00:00Added an answer on May 28, 2026 at 4:38 am

    Don’t separate the three numeric looking pieces of Amazon’s current order number. Your database engine is fast enough to find an order by this number when its column is properly indexed. I get the ‘premature optimization’ sense from your question here.

    Consider these suggestions:

    • widen your column to varchar(100) or something larger than 19. You’re dependent on the vendor, and making a big assumption that their structure will never change.

    • put an index on this column. 100K rows is a very small dataset.

    • find equality, rather than likeness as you’re currently doing. WHERE Order='123-456-234

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

Sidebar

Related Questions

I need to store relative path of a document into a MySQL table. The
i have a problem with double values i need to store in an android
I have a problem constructing a mysql query: I have this table tSubscribers were
Hello i have a problem with c# Arrays. I need a array to store
I have a need to store multiple datatypes(like int or string mostly) inside a
Here is my problem: I need to store HTML in a MySQL database. Afterwards,
Alright, so I have a table that I need to store in a database.
Alright, so I have a problem. I need to create a folder to store
I have a following problem: I need to store generic objects with different type
Problem: Need to store field value when doing this query on my database. Have

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.