[Phpmyadmin-devel] Memory vs Speed

Alex Marin alex.ukf at gmail.com
Sat Apr 14 23:08:26 CEST 2012


Hi,

I've got an implementation question:
Say we have a file with tables to be imported and we have two ways
of doing so, each of them having different performance issues:

  1. Keep an array with all the tables' contents and runĀ PMA_buildSQL()
  after all of them have been read.
  2. Once a full table has been read, insert it with PMA_buildSQL()
  in the database.

Option 1. has the advantage of making only one call to the expensive
PMA_buildSQL() function. But what happens if we have more than 1000
tables? The array containing all of them will grow pretty big.
Option 2. uses far less memory in this case, but, on the other hand,
it makes 1000 calls to the previous function.

What would make a good argument in choosing one of those approaches?

--
Alex




More information about the Developers mailing list