public inbox for [email protected]  
help / color / mirror / Atom feed
From: Xikui Wang <[email protected]>
To: [email protected]
Subject: Implicit query plan caching within a connection
Date: Tue, 19 Mar 2019 18:09:22 -0700
Message-ID: <CAN-bgPqznO45pHHcvnOQG0YQAN6ksjTEv1Q4s_mBWg02u4gTxg@mail.gmail.com> (raw)

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


reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: Implicit query plan caching within a connection
  In-Reply-To: <CAN-bgPqznO45pHHcvnOQG0YQAN6ksjTEv1Q4s_mBWg02u4gTxg@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox