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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T22:07:49+00:00 2026-05-25T22:07:49+00:00

Let say i have 100k records in table, after fetching that records from table

  • 0

Let say i have 100k records in table, after fetching that records from table i am pushing it to an array with some calculations, and then send them to server for further processing.

I have test the scenario with(1k) records, its working perfectly, but worrying about if there is performance issue, because the page which do calculation and fetching records from db run after each 2 mins.

My Question is can I use array for more than 2 Millions records?

  • 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-25T22:07:49+00:00Added an answer on May 25, 2026 at 10:07 pm

    My Question is can I use array for more than 2 Millions records?

    Yes you can, 2 Million array entries is not a limit in PHP for arrays. The array limit depends on the memory that is available to PHP.

    ini_set('memory_limit', '320M');
    $moreThan2Million = 2000001;
    $array = range(0, $moreThan2Million);
    echo count($array); #$moreThan2Million
    

    You wrote:

    The page is scheduled and run after 2 min, so I am worrying about the performance issue.

    And:

    But I need to fetch all, not 100 at time, and send them to server for further processing.

    Performance for array operations is dependent on processing power. With a fast enough computer, you should not run into any problems. However, keep in mind that PHP is an interpreted language and therefore considerably slower than compiled binaries.

    If you need to run the same script every 2 minutes but the runtime of the script is larger than two minutes, you can distribute script execution over multiple computers, so one process is not eating the CPU and memory resources of the other and can finish the work in meantime another process runs on an additional box.

    Edit

    Good answer, but can you write your consideration, about how much time the script will need to complete, if the there is no issue with the server processor and RAM.

    That depends on the size of the array, the amount of processing each entry needs (in relation to the overall size of the array) and naturally the processor power and the amount of RAM. All these are unspecified with your question, so I can specifically say, that I would consider this unspecified. You’ll need to test this on your own and building metrics for your application by profiling it.

    I have 10GB RAM and More than 8 Squad processor.

    For example you could do a rough metric for 1, 10, 100, 1000, 10000, 100000 and 1 million entries to see how your (unspecified) script scales on that computer.

    I am sending this array to another page for further processing.

    Metric as well the amount of data you send between computers and how much bandwidth you have available for inter-process communication over the wire.

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

Sidebar

Related Questions

Let say I have a request table, that looks as follows: RequestId INT ReferenceNumber
Let say i have one asp.net application that is having some page that uses
Let say I have an array like: Array ( [0] => Array ( [Data]
Let say i have some words AB, AAB, AA. AB is not a prefix
Let say I have a BitmapData with different pixels representing an object, and some
Let say I have this table, A B ------- 1 A 2 C 3
Let say i have three table (post, wall, photo) post (id, post_uid, post_content, post_timestamp)
Let say I have 2 controls in a usercontrol : One (controlA) that have
Let say I have a file that contains a serialized object by BinaryFomatter. Now
Let say I have a Transformation class that extending a CommonDomain class. and I

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.