Reputation
8,719
Top tag
Next privilege 10,000 Rep.
Access moderator tools
Badges
4 20 46
Newest
 Caucus
Impact
~425k people reached

1h
comment Why does this fast postgres query show up in the slow query log?
@8bitartist I'm not sure if you misunderstood me - I tried to suggest running the query you posted above (without preparing it), and compare the log output. In the meantime, you could just as well try the EXPLAIN ANALYZE on a prepared statement yourself.
3h
reviewed Close insert or update on table “ aaa” violates foreign key constraint
3h
comment Why does this fast postgres query show up in the slow query log?
@8bitartist what you see is a log of a prepared statement - if you set the log_min_duration_statement to 0, you'll get your query in your question also logged and yo can notice the difference. 'Normal' queries don't have parameters.
3h
reviewed Reviewed How can I tell how many Cores SQL Server is actually using?
3h
comment How can I tell how many Cores SQL Server is actually using?
Please check your formatting possibilities (the question mark icon on the top right of the editor panel). For the 4th paragraph, you may want to use the code block markdown.
3h
reviewed Edit SQL server only using 4 GB ram
3h
revised SQL server only using 4 GB ram
Changed some words and corrected formatting
3h
comment Why does this fast postgres query show up in the slow query log?
Have you tried to prepare that statement and call it with the parameter, on a cold cache? Depending on your data, the prepared statement can result in an inferior query plan - it has to be a generic one, fitting every possible parameter. And uncached table/index data can again slow things down.
10h
reviewed Close How to encrypt user passwords for forum registrations?
15h
reviewed Edit SQL Server 2014 AG Listener
15h
revised SQL Server 2014 AG Listener
edit tagging
15h
reviewed Edit How to identify database users and their owned schemas before dropping server logins?
15h
revised How to identify database users and their owned schemas before dropping server logins?
formatting
15h
reviewed Edit Find and Replace text in all table using mysql query
15h
revised Find and Replace text in all table using mysql query
formatting
15h
reviewed Close Getting issue while creating SQL Server Agent job
15h
reviewed Close SQL Server 2014 vs Amazon Redshift performance
15h
reviewed Close Best Admin Tool for Postgres
1d
revised Simultaneous calls to the same function: how are deadlocks occurring?
added 23 characters in body
1d
reviewed Edit Lock wait timeout exceeded; try restarting transaction in NDB