Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1ugNlz-002EFp-MU for pgsql-general@arkaria.postgresql.org; Mon, 28 Jul 2025 13:20:12 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1ugNly-007h2w-H0 for pgsql-general@arkaria.postgresql.org; Mon, 28 Jul 2025 13:20:10 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1ugNly-007h2o-5r for pgsql-general@lists.postgresql.org; Mon, 28 Jul 2025 13:20:10 +0000 Received: from mail-oa1-x34.google.com ([2001:4860:4864:20::34]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1ugNlw-001D8Y-1L for pgsql-general@lists.postgresql.org; Mon, 28 Jul 2025 13:20:09 +0000 Received: by mail-oa1-x34.google.com with SMTP id 586e51a60fabf-303058a8649so1387821fac.3 for ; Mon, 28 Jul 2025 06:20:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amiralearning.com; s=google; t=1753708807; x=1754313607; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=LxNlyotKkDbCXyIBo2AtUGKPDCM+IIe1Pvy18CV9v6A=; b=Qpc2QnsLeYjRxDqSkwsO+RniAU9vzpzsUu5taObq3unM1LgCDvaguKySBb8P3opjpd P5I78uBgeDTeSDNV9G+qMVFPtQH3ue9LxB5X06dWoOSwaNAOHnkcZkvAP6Vbu4vsOc2q GLg2XeC3ARfLgpcLNC/rvneiRqcKjvbbEYN95ZILHyOIJ0QD+XrzbMVwn1PcJYJA+88F QSJfaCg4l0b6pGXpLQ9t0+Ly6Q7JZ6v33qiIpmdIwHeZGwYak/BjBoLGkhOky2ILOQ06 HLzlDM3HoUyLa5hkWJqXYlX/leM+kTCGFOM+2aHHRcrZCEQ4lOq8XFySiLNbaWs7UXS8 HdkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1753708807; x=1754313607; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=LxNlyotKkDbCXyIBo2AtUGKPDCM+IIe1Pvy18CV9v6A=; b=VMBkcw6cQOwZkrmBQQz4aFmmU/yOi/nJIDu6mY2lwkQYUT8lyxvH+pVbJ8GZD9F6TB OfwVYnn2iX9jt67CM/IZdLY11v3DTmgNhhtqB9dB+sL9Fud5704lMGktzZ0UuDfuyqda VGrp6G/eqqdR8TfLCCkzs6CeuZoQFwVVypYg+hVlMfihhC5nzAt8meV5tPNifZpz/kaE EixqOAEN5EKPGaH8A9xxraZCrdWg3I8l66VQOctA2NLvfJMRQ/ncjbaiSbTaTM6rVp6+ mG4XlbE8AJF9aQTJamMMhGBxr0NYSd9P6RvWwJBgY5ta8UrsuEkkwfGYiChBFrXLqlqB X1WQ== X-Forwarded-Encrypted: i=1; AJvYcCV6BCf6+R2pPg/+DoCWrWwGOxvOAeRLhdMBqI5DfDBgnNUi6c8WFFYOBKcwj8jHZtxqEIe58+HsZ1AUlgUr@lists.postgresql.org X-Gm-Message-State: AOJu0Yyq2BrNXWEzsgSYhW5KNPeiGP7GcqZIMcrBAchTmnQgA9xrWk5h H6O1KS0ScLVnMEgeuwxPhNklYBdmuFyD+m6BVRIi/uhym+i7wZ/MlFLEgVg18v4nd74P/+j+GNH x3aAfTL5aZDBvrNKRFib/GoPCfvCYnYG6BBO+Vbdr X-Gm-Gg: ASbGncuWqSblMkjcjTfMurxZDAVFxIn1BuaKGJH84wBQp+IahGtOGaFNdnWlp6ftOjC 4tSUFG+dLVRHdZfoTi9HubbKCrDiUHIVX8JWttYPhcrEKW2H3YzF7ifI5gZC0YIbfJJhq/tLeD8 TXUH8mtXjnNJQi0W1EpvrnsOm34QgRpkY9KK+IO9Qx0zMeLyXlU3+9WbTjz7VgITkBrmuytF7hd qEUXxts X-Google-Smtp-Source: AGHT+IF7VvyzL8CpbpspnnrtouznhNoEdNhJePGVOP9+n88UOVvC622bvwBOrSEU60FAexQkpztVX0HJHCbD7G8KC+Y= X-Received: by 2002:a05:6808:1409:b0:42a:3636:115f with SMTP id 5614622812f47-42bb962e4f8mr8069185b6e.28.1753708807470; Mon, 28 Jul 2025 06:20:07 -0700 (PDT) MIME-Version: 1.0 References: <090d8588-e74e-4436-8f69-05ce8624379b@aklaver.com> <0BC8BEBF-3B1F-4E69-A1B9-CCCDF9617168@thebuild.com> In-Reply-To: From: David Barbour Date: Mon, 28 Jul 2025 08:19:56 -0500 X-Gm-Features: Ac12FXzAnO46u6mYxoxHMQ7lcIK4MwcbYkswtmUchTlEDUv-FSpouwws1X87AQM Message-ID: Subject: Re: Get info about the index To: Jon Zeppieri Cc: Igor Korot , Christophe Pettus , Adrian Klaver , "pgsql-generallists.postgresql.org" Content-Type: multipart/alternative; boundary="0000000000008288fc063afd26b3" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000008288fc063afd26b3 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Couple of suggestions. You might try ChatGPT. I've had some success using this tool to uncover improvements to the use of indexes. The other would be to look at https://explain.depesz.com/. It's pretty self-explanatory. You run an explain plan and paste the results into the tool and it will run an automated analysis. On Sat, Jul 26, 2025 at 2:51=E2=80=AFPM Jon Zeppieri w= rote: > On Sat, Jul 26, 2025 at 3:13=E2=80=AFPM Igor Korot w= rote: > > > > I didn't find the sorting for the field. > > > > Can you help? > > The pg_index_column_has_property() can provide this information. E.g., > > select pg_index_column_has_property('my_index'::regclass, 2, 'desc'); > > > --0000000000008288fc063afd26b3 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Couple of suggestions.=C2=A0 You might try ChatGPT.=C2=A0 = I've had some success using this tool to uncover improvements to the us= e of indexes.=C2=A0 The other would be to look at=C2=A0https://explain.depesz.com/.=C2=A0 It's pretty = self-explanatory.=C2=A0 You run an explain plan and paste the results into = the tool and it will run an automated analysis.

On Sat, Jul 26, 2025 at 2:51= =E2=80=AFPM Jon Zeppieri <zeppieri@gmail.com> wrote:
On Sat, Jul 26, 2025 at 3:13=E2=80=AFPM Igor = Korot <ikorot01@= gmail.com> wrote:
>
> I didn't find the sorting for the field.
>
> Can you help?

The pg_index_column_has_property() can provide this information. E.g.,

select pg_index_column_has_property('my_index'::regclass, 2, 'd= esc');


--0000000000008288fc063afd26b3--