efficiency

Worth the overhead to use a temporary table for copying a row?

When faced with the task of copying a record in a database and modifying just a handful of values, I tend to use a temporary table to avoid writing out all of the unchanged columns. Does anyone know how this would affect performance on a large scale system? A quick example (which also shows why I prefer the temporary table method): Le...

Effcient method for ajax autocomplete query on big db table and busy site

We're all familiar with the autocomplete tagging setup here on SO. I'm wondering what is the most efficient method for querying the tag table in this scenario. A busy site with many users tagging away with the autocomplete feature requires a lot of querying. Say at any one time there are 100 users typing an average of 10 characters to ...

Is the following array well defined for binary search?

Hello, I have a file with consisted of int;int values in each line. Both columns are ascending, row by row. I plan to load that file into an array with following code: while( ! feof($f) ) { $line = fgets( $f, 32 ); $tmp = explode( ";", $line ); $elements[] = array( $tmp[0] => $tmp[1] ); } I intend to use this array to do ...