Dear Andrei, > Certaily I was thinking about this. And I've taken an advice of Teodor > Sigaev - a much more expirienced developer than me. It seems that > GetCurrentTimestamp() is fast enough for our purpose and we won't call > it too often - only on new statement entry allocation.
OK. > However, there is another way - we can store the curent value > of pg_stat_statements_info.dealloc field when allocating a new > statement entry instead of timstamping it. Probably, it would be little > faster, but timestamp seems much more valuable here. I don't like the idea because such a column has no meaning for the specific row. I prefer storing timestamp if GetCurrentTimestamp() is cheap. Best Regards, Hayato Kuroda FUJITSU LIMITED