Speed up Postgres OLTP - eliminate plan time
1
vote
1
answer
67
views
We have an application with millions of similar queries that are executed in the following way:
UPDATE
flow.thread tr
SET
state = $1,
updated_at = now()
WHERE
tr.conversation_number = $2
AND tr.partner_number = $3
AND tr.sender_number = $4
AND tr.channel = $5
AND tr.status IN ($6,$7,$8)
As you may see, this query is parameterized, so does that mean it's already prepared? In
pg_stat_statements
view I can see that this query has 1,065,893 calls and the query has 1,065,893 plans. So looks like we did not get rid of execution plan building or parsing time.
Could you help me figure out this: Doesn't a parameterized query mean that the statement is PREPARED?
Asked by Mikhail Aksenov
(430 rep)
Aug 13, 2021, 07:44 AM
Last activity: Aug 17, 2021, 06:22 AM
Last activity: Aug 17, 2021, 06:22 AM