[PATCH] Avoid unnecessary code execution in Instrument.c when TIMING is FALSE - Mailing list pgsql-hackers

From Hironobu SUZUKI
Subject [PATCH] Avoid unnecessary code execution in Instrument.c when TIMING is FALSE
Date
Msg-id df1eb648-b0b7-496d-b047-d7a7a157b2c7@interdb.jp
Whole thread Raw
Responses Re: [PATCH] Avoid unnecessary code execution in Instrument.c when TIMING is FALSE
Re: [PATCH] Avoid unnecessary code execution in Instrument.c when TIMING is FALSE
List pgsql-hackers
Hi,

Even when using EXPLAIN ANALYZE with TIMING=FALSE, the functions 
InstrStopNode(), InstrEndLoop(), and InstrAggNode() in Instrument.c 
still execute code related to the "starttime", "counter", "firsttuple", 
"startup",  and "total" fields within the Instrumentation structure.
These operations are unnecessary when timing is disabled, and since 
these functions are called very frequently, I have created a patch to 
address this.

As far as I can tell, this change has no side effects and clarifies the 
intent of each line, but please let me know if you notice any issues.

Best regards,
H.S.
Attachment

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: HASH_FIXED_SIZE flag gets lost when attaching to existing hash table
Next
From: Sami Imseih
Date:
Subject: Re: track generic and custom plans in pg_stat_statements