With MySQL, you can use CONCAT:

SELECT * FROM sam_users 
  WHERE CONCAT(user_firstname, ' ', user_lastname) LIKE ?


or CONCAT_WS (which ignores NULL values):

SELECT * FROM sam_users 
  WHERE CONCAT_WS(' ', user_firstname, user_lastname) LIKE ?


However, MySQL won't be able to use any indices when performing this query. If the value of the pattern argument to LIKE begins with a wildcard, MySQL won't be able to use indices, so comparing to a generated value (instead of a column) won't make a difference.

You can also set the MySQL server SQL mode to "ANSI" or "PIPES_AS_CONCAT" to use the || operator for string concatenation.

SET @@sql_mode=CONCAT_WS(',', @@sql_mode, 'PIPES_AS_CONCAT');
SELECT * FROM sam_users 
  WHERE (user_firstname || ' ' || user_lastname) LIKE ?


This sets the SQL mode for the current session only. You'll need to set @@sql_mode each time you connect. If you wish to unset 'PIPES_AS_CONCAT' mode in a session:

SET @@sql_mode=REPLACE(@@sql_mode, 'PIPES_AS_CONCAT', '');


MySQL appears to remove any extra commas in @@sql_mode, so you don't need to worry about them.

Don't use SELECT *; select only the columns you need.

Combining two fields in SELECT statement
I have an Intel 320 SSD which is supposedly able to flush its cache during a power loss.

From Storage Review:


  Rarely seen in a consumer SSD, Intel uses an array of capacitors to
  make sure data gets saved to the drive in the event of an unsafe
  shutdown as the result of power loss.


From Intel:


  The Intel SSD 320 Series contains hardware- and firmware-based
  power-loss data protection features. The SSD includes a power-fail
  detection circuit, which  sends a signal to the ASIC controller in the
  SSD indicating there is an imminent drop in power level. Triggered
  by this, SSD firmware disconnects the input power from the SSD.
  
  The SSD then relies on its on-board power-loss protection capacitance
  to provide enough energy for  the SSD firmware to move data from the
  transfer buffer and other temporary buffers to the NAND.


Does it mean I can safely turn off "Windows write-cache buffer flushing"? My primary motivation is to improve performance, although I'm aware that this might not make a big change for desktop workload.
