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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T13:49:33+00:00 2026-06-14T13:49:33+00:00

I have a fairly large table (~5 MB csv file) stored on our server

  • 0

I have a fairly large table (~5 MB csv file) stored on our server that consists of purely numeric data giving some result based on two parameters, e.g.

A     B     Output
-----------------------
1     1     20
1     2     21
1     3     22
2     1     23
2     2     24
2     3     25
...   ...   ...

What I’d like to do is, based on the user’s input, find the closest parameters then use the appropriate output. For example, using the table above, if the user select A=1.1 and B=2.9, the Output would be 22.

What is the best way to do this table lookup in php? Do I need to load the entire table into PHP? Instead of a csv-file, should I make it binary so that the file size is smaller and loads faster? Or should I create a mySQL database and perform a look-up that way?

TL;DR: I’m looking for the most efficient way to perform a nearest-neighbor table look-up on strictly numeric data.

  • 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-06-14T13:49:34+00:00Added an answer on June 14, 2026 at 1:49 pm

    If mysql is available, my suggestion would be to use a table and do a look up. I guess rounding the user input to the nearest integer before lookup should give you the closest.

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

Sidebar

Related Questions

I have a fairly large webapp that I run on a Media Temple server.
I have created a series of views that operate on a fairly large table.
We have a query that runs off a fairly large table that unfortunately needs
I have a large file, with 1.8 million rows of data, that I need
I have a web application that uses a fairly large table (millions of rows,
I have a table (that can be fairly large....say 200x200 px) where each cell
I have a large table stored in mysql (basically, a log) that looks like
We have a full text index on a fairly large table of 633,569 records.
I have a MySQL database with a fairly large table where the products are.
I have a fairly large Excel file. In this file there is a column

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.