Implicit query plan caching within a connection

From: Xikui Wang <xikuiw(at)uci(dot)edu>
To: psycopg(at)lists(dot)postgresql(dot)org
Subject: Implicit query plan caching within a connection
Date: 2019-03-20 01:09:22
Message-ID: CAN-bgPqznO45pHHcvnOQG0YQAN6ksjTEv1Q4s_mBWg02u4gTxg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Browse psycopg by date

  From Date Subject
Next Message Daniele Varrazzo 2019-03-21 20:43:50 Psycopg 2.8 beta 2 released
Previous Message Daniele Varrazzo 2019-02-16 15:07:10 Psycopg 2.8 beta 1 released