Archives

The List

Archive for April, 2008

« Previous Entries

PHP array_merge is Slow

Wednesday, April 30th, 2008

…or I’m doing something stupid, in which case I hope someone would enlighten me.
We grab a number of data from two different MySQL servers, get them back as arrays ($ar1 and $ar2) and then we concatenate the two arrays. $ar1 consists of 30 to 200 elements, sometimes more. $ar2 typically contains 30 elements.
The PHP way [...]

MySQL Pop Quiz #27

Tuesday, April 29th, 2008

I’m still looking for new entries. I get quite a few suggestions, but not all of them make it into quiz questions. Do send in your suggestions!
This wonderful quiz from Vladimir Kolesnikov is one of those that should make you stop and think for a moment…
Given this table and data:
mysql> SELECT * FROM t;
+——+——+
| i1 [...]

DATABASE() :: MySQL Function of the Day

Tuesday, April 29th, 2008

Function name: DATABASE()
Aliases: -
Function type: Information function
Purpose: Return the name of the current database

MySQL Function of the Day: Week Seven

Monday, April 28th, 2008

The weekly run-down of MFotD
(See this post for background information on MySQL Function of the Day)
Week Seven:

Monday, April 21st, 2008: ROUND()
Tuesday, April 22nd, 2008: TRUNCATE
Wednesday, April 23rd, 2008: LOG()

ENCODE() :: MySQL Function of the Day

Monday, April 28th, 2008

Function name: ENCODE
Aliases: -
Function type: Encryption function
Purpose: Encrypt a string using a password

MySQL Pop Quiz #26

Thursday, April 24th, 2008

I’m still looking for new entries. I get quite a few suggestions, but not all of them make it into quiz questions. Do send in your suggestions!
Today’s quiz question, which subsequently became three, comes courtesy of Janek Bogucki.
Since questions 2 and 3 contain hints on the other questions, they are embedded within the answers to [...]

LOG() :: MySQL Function of the Day

Wednesday, April 23rd, 2008

Function name: LOG()
Aliases: (LN, LOG2, LOG10)
Function type: Numerical function
Purpose: Return the logarithm of a number

MySQL Pop Quiz #25

Wednesday, April 23rd, 2008

I’m still looking for new entries. I get quite a few suggestions, but not all of them make it into quiz questions. Do send in your suggestions!
This quiz on INFORMATION_SCHEMA is stolen (with permission!), from Roland:

Specify a minimal set of columns of the information_schema.TABLE_CONSTRAINTS table that is sufficient to reliably identify a single row in [...]

TRUNCATE :: MySQL Function of the Day

Tuesday, April 22nd, 2008

Function name: TRUNCATE
Aliases: -
Function type: Numerical function
Purpose: Round a number toward zero

ROUND() :: MySQL Function of the Day

Monday, April 21st, 2008

Function name: ROUND
Aliases: -
Function type: Numerical function
Purpose: Round a number to a certain number of decimal places
Description: MySQLs ROUND() is an extremely versatile implementation of rounding functions wrapped into one single function. To wit:

« Previous Entries