pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Dürr Software <info@fduerr.de>
To: rob stone <floriparob@tpg.com.au>
To: pgsql-general@postgresql.org
Subject: Re: PgSQL 15.3: Execution plan not using index as expected
Date: Sat, 12 Aug 2023 11:03:27 +0200
Message-ID: <dd30280b-dd5f-f762-81c7-a19658b2f868@fduerr.de> (raw)
In-Reply-To: <f91820f43eb45bab7e9d93b994a00985d9a28285.camel@tpg.com.au>
References: <e7534f4d-489f-e29f-9932-834853445814@fduerr.de>
	<f91820f43eb45bab7e9d93b994a00985d9a28285.camel@tpg.com.au>

Thanks Rob,

no it's not a problem with the index. It's a problem with the use of 
CURRENT_USER in the WHERE
I submitted a new post on this matter with a test case.

Kind regards

======================================
Dürr Software Entw.
Guggenberg 26, DE-82380 Peißenberg
fon: +49-8803-4899016  fax: +49-8803-4899017
info@fduerr.de

Am 12.08.23 um 04:25 schrieb rob stone:
> Hello,
>
>> ---------------------------------------------------------------------
>> -------------------------
>>    PostgreSQL 9.3.4 on x86_64-unknown-linux-gnu, compiled by gcc
>> (Debian
>> 4.8.3-2) 4.8.3, 64-bit
>>
>>
>> ---------------------------------------------------------------------
>> ------------------------------------------------
>>    PostgreSQL 15.3 (Debian 15.3-1.pgdg120+1) on x86_64-pc-linux-gnu,
>> compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit
>> (1 Zeile)
>>
>>
> 9.3 plan
> ->  Index Scan using client_session_user_id_idx on client_session
>
> Looks like a collation issue given the difference in compilers used.
> In the 9.3 plan the index is used.
> Maybe try a reindex of the table.
>
> HTH,
> Rob
>

Attachments:

info.vcf (text/vcard, 213B) download begin:vcard fn;quoted-printable:Franz D=C3=BCrr n;quoted-printable:D=C3=BCrr;Franz email;internet:info@fduerr.de tel;work:08803-4899016 tel;fax:08803-4899017 tel;home:08803-489375 version:2.1 end:vcard

view thread (6+ messages)

Message-ID: <dd30280b-dd5f-f762-81c7-a19658b2f868@fduerr.de>
Permalink:  ../dd30280b-dd5f-f762-81c7-a19658b2f868@fduerr.de/
Also on:    postgresql.org/message-id/dd30280b-dd5f-f762-81c7-a19658b2f868@fduerr.de

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: info@fduerr.de, floriparob@tpg.com.au
  Subject: Re: PgSQL 15.3: Execution plan not using index as expected
  In-Reply-To: <dd30280b-dd5f-f762-81c7-a19658b2f868@fduerr.de>
  References: <e7534f4d-489f-e29f-9932-834853445814@fduerr.de> <f91820f43eb45bab7e9d93b994a00985d9a28285.camel@tpg.com.au> <dd30280b-dd5f-f762-81c7-a19658b2f868@fduerr.de>

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

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