When I've seen him do PHP queries against a MySQL DB, he doesn't just do a single query. He'll usually pull in multiple bits of information even though to me it doesn't seem relevant. But afterwards in his PHP script, the data returned from the queries is used in groups. Kind of hard to explain I guess. It's just that my thinking would be:
Execute a query and pull in one column of data
Process the data
Execute another query for another column
Process that data
etc...
Then take all the data stored in arrays and format it for display
Whereas his thinking seems to be
Execute a query to pull in all needed data from multiple tables
Process in one function and format for display
I guess maybe it just takes having a lot of familiarity with the language and you start to see the quicker way of doing things. His approaches also seem to be able to avoid the spaghetti logic I get myself into sometimes by nature of their compactness.