Jump to content

speeding up variable assignments


niche

Recommended Posts

I'm using information from 4 tables. This info is used to assign data to many variables where each assignment is a line of code. What techniques, approaches, concepts are available that can significantly reduce the time it would take to make these variable assignments other than simply reducing the amount of data I'm using through elimination or combining variables?

Link to comment
Share on other sites

Thought about that. In fact, woke-up this morning thinking I could aggregate the needed info in a single column and take it apart in a loop, but decided that was probably no different than a loop and mysql_fetch_array. Right?

Link to comment
Share on other sites

If you access the data frequently and it doesn't change very option, one option would be to build a data structure like an object or array and store the serialized version in the database. You can read that string and unserialize it all at once back into a data structure. Whenever the data changes you'll need to create the new data structure and update the database with the serialized version.

Link to comment
Share on other sites

Looks promising. I'll check it out. Thanks to ShadowMage, justsomeguy, and thescientist.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...