There's not a single query in there. The only potential bottleneck I can see in there is session_start(), which would only be a bottleneck if you have another request processing while it waits for the session to be freed. In such cases you should do session_write_close() as early as possible after session_start() in anything that might hog up the session. Otherwise, if you think it's a database query, please show us some code related to the query.