Implicit query plan caching within a connection - Mailing list psycopg

From Xikui Wang
Subject Implicit query plan caching within a connection
Date
Msg-id CAN-bgPqznO45pHHcvnOQG0YQAN6ksjTEv1Q4s_mBWg02u4gTxg@mail.gmail.com
Whole thread Raw
List psycopg
Hi Devs,

I'm working on a performance test using Psycopg2 + Postgres. My workload is to do a spatial join to use one data point joining two reference tables by repeatedly issuing a query string with different coordinates. The average query execution time that I got is 0.5 ms, which is surprisingly fast. I started a pgsql terminal and analyzed the same query multiple times. The overall execution time is around 1.5ms with ~1ms in planning and 0.5ms in execution. That makes me is that because psycopg2 implicitly cached the plan. Is there any implicit optimization there? Thanks in advance!

Best,
Xikui

psycopg by date:

Previous
From: Daniele Varrazzo
Date:
Subject: Psycopg 2.8 beta 1 released
Next
From: Daniele Varrazzo
Date:
Subject: Psycopg 2.8 beta 2 released