In php, will storing an array use less or more memory than an sql query for the

  • Thread starter Thread starter WebTechGlobal
  • Start date Start date
W

WebTechGlobal

Guest
same purpose? I'm the developer of CSV 2 POST Pro for Wordpress and I want to speed it up. It imports hundreds of thousands of records and so the slightest improvement in my script can greatly increase performance. I only finished University last year so theres no way I'm going to know stuff like this.

If I have a group of settings stored in database then make a querie and hold the results for accessing 100,000 times. Would this be better or worse than having an array ( don't worry about where the array comes from at this point) and accessing that 100,000 times?

For Wordpress developers, the array would come from options so although the question is not regarding the speed of the method in obtaining the data please feel free to add any info on. I'm thinking wordpress get_option can't be faster than a direct sql query so its the long term use of the resulting data I REALLY need to know.

Thanks all
WebTechGlobal
 
Back
Top