[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [OSSTEST PATCH 06/14] sg-report-flight: Use WITH clause to use index for $anypassq


  • To: George Dunlap <George.Dunlap@xxxxxxxxxx>
  • From: Ian Jackson <ian.jackson@xxxxxxxxxx>
  • Date: Fri, 31 Jul 2020 11:41:38 +0100
  • Authentication-results: esa6.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Fri, 31 Jul 2020 10:41:47 +0000
  • Ironport-sdr: k3QZCc8dLZYDj6xPz2waUH76gXHfrEwNjXZNj+BM+dNfiYnaYLukQojYUs+Vbw4N6zn+Wh1L8K 7bToiAWkQb77i7AqU012UPYt+mz92Fser6ZPFme82UT9dDfUvwgUdqTahpTnu3ohjZFNB19IPE bG1pF84YEms39/HreLcxYQtIzfPiAsTtCVhDqSWEssdj1XyXwuw72+FhEsaQsa5tedsh8W0kVq jlidcNedDT+PxKWI8X3riLY/TnHGWFWe3JHVnHShcj+3WbouTc+XyLX4IAYHVk3oCT7mpWp9jq E2c=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

George Dunlap writes ("Re: [OSSTEST PATCH 06/14] sg-report-flight: Use WITH 
clause to use index for $anypassq"):
> > On Jul 21, 2020, at 7:41 PM, Ian Jackson <ian.jackson@xxxxxxxxxxxxx> wrote:
> > +    # In psql 9.6 this WITH clause makes postgresql do the steps query
> > +    # first.  This is good because if this test never passed we can
> > +    # determine that really quickly using the new index, without
> > +    # having to scan the flights table.  (If the test passed we will
> > +    # probably not have to look at many flights to find one, so in
> > +    # that case this is not much worse.)
> 
> Seems a bit weird, but OK.  The SQL looks the same, so:
> 
> Reviewed-by: George Dunlap <george.dunlap@xxxxxxxxxx>

Thanks.  This business with the WITH clause as an optimisation fence
is well-known in Postgres circles, it seems.

Ian.




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.