Fastest SELECT query

Tags: databases, webdevelopment, programming.
By lucb1e on 2012-01-15 15:43:49 +0100

Just a quick post about some speedtests I did. I couldn't quickly find which way was the fastest.

TABLE t: col1, col2, col3, col4, col5 (a mix of integers and varchars)

Run 1: 3.722 miliseconds
Run 2: 3.742 miliseconds

SELECT `col1`, `col2`, `col3`, `col4`, `col5` FROM t
Run 1: 3.673 miliseconds
Run 2: 3.699 miliseconds

SELECT `col1`, `col2`, `col3`, `col4` FROM t
Run 1: 3.608 miliseconds
Run 2: 3.605 miliseconds

SELECT col1, col2, col3, col4 FROM t
Run 1: 3.603 miliseconds
Run 2: 3.616 miliseconds
Another post tagged 'databases': Searching 10GB of data As A Service - lessons learned

Look for more posts tagged databases, programming or webdevelopment.

Previous post - Next post