postgres 16 index double variable seems to fail. postgres 15 OK

From: Vladislav Malyshkin <mal(at)gromco(dot)com>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: postgres 16 index double variable seems to fail. postgres 15 OK
Date: 2024-12-10 13:18:53
Message-ID: ce5c81ea-9620-4cc0-adba-e8aef7ea44e9@gromco.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

<!DOCTYPE html>
<html>
<head>

<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
I am not completely sure, but there seems to be a regression in
postgres 16.<br>
Let there be a table with millions of records<br>
<br>
  CREATE TABLE table1(<br>
    inode int::8 not null,<br>
    fieldNum int not null,<br>
    wordFromText text not null,<br>
    wordIndex int<br>
  );<br>
with multi-field index<br>
CREATE INDEX table1_indx_textsearch2_Words ON table
(inode,fieldNum,wordIndex);<br>
<br>
The problem now seems to be that the queries on a single variable
inode such as <br>
DELETE FROM table1 WHERE inode=133218<br>
and others, especially when used in some JOIN, it seems does not use
the index and run slow. <br>
There were no such problem in postgres 15.<br>
When I create one more index, now a single-field one.<br>
CREATE INDEX table1_indx2 ON table (inode);<br>
postgers 16 becomes fast again. <br>
Postgres 15 was happy with thee fields index
(inode,fieldNum,wordIndex), and did not need a single variable
index.<br>
<br>
Vladislav<br>
<br>
</body>
</html>

Attachment Content-Type Size
unknown_filename text/html 1.2 KB

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Euler Taveira 2024-12-10 14:30:36 Re: postgres 16 index double variable seems to fail. postgres 15 OK
Previous Message Tom Lane 2024-12-10 02:12:32 Re: TimestampTz->Text->TimestampTz casting fails with DateStyle 'Postgres'