Hello Team,
I have a problem with the explain analyze' output of some queries. There is too high planning time, but the execution time is relatively low. What is the possible reason behind this problem? I also ran the vacuum and analyze commands for the table.
EXPLAIN ANALYZE select
i."DefinitionId",
from
"T_WF_INSTANCE" i
where
i."InstanceId" = 10045683193;
QUERY PLAN
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Index Scan using "T_WF_INSTANCE_InstanceId_ApplicationCd_EntityStatusCd_idx" on "T_WF_INSTANCE" i (cost=0.57..2.79 rows=1 width=34) (actual time=2.522..2.522 rows=1 loops=1)
Index Cond: ("InstanceId" = '10045683193'::bigint)
Planning Time: 8460.446 ms
Execution Time: 2.616 ms
(4 rows)
i."DefinitionId",
from
"T_WF_INSTANCE" i
where
i."InstanceId" = 10045683193;
QUERY PLAN
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Index Scan using "T_WF_INSTANCE_InstanceId_ApplicationCd_EntityStatusCd_idx" on "T_WF_INSTANCE" i (cost=0.57..2.79 rows=1 width=34) (actual time=2.522..2.522 rows=1 loops=1)
Index Cond: ("InstanceId" = '10045683193'::bigint)
Planning Time: 8460.446 ms
Execution Time: 2.616 ms
(4 rows)
Thank you,
Kenny