Re: SELECT with LIKE clause makes full table scan
Matthias Apitz <guru@unixarea.de>
From: Matthias Apitz <guru@unixarea.de>
To: Julien Rouhaud <rjuju123@gmail.com>
Cc: Dominique Devienne <ddevienne@gmail.com>, Matthias Apitz <guru@unixarea.de>, Josef Šimánek <josef.simanek@gmail.com>, pgsql-general <pgsql-general@lists.postgresql.org>
Date: 2022-01-26T15:07:28Z
Lists: pgsql-general
We changed two relevant Indexes to CREATE INDEX d01ort ON d01buch(d01ort bpchar_pattern_ops ); CREATE INDEX d01ort2 ON d01buch(d01ort2 bpchar_pattern_ops ); and now the same queries are fast. We're looking through our code for more such LIKE clauses on VCHAR columns. Thanks for all the hints matthias -- Matthias Apitz, ✉ guru@unixarea.de, http://www.unixarea.de/ +49-176-38902045 Public GnuPG key: http://www.unixarea.de/key.pub