[MASSMAIL]psql: Greatly speed up "\d tablename" when not using regexes - Mailing list pgsql-hackers

From Jelte Fennema-Nio
Subject [MASSMAIL]psql: Greatly speed up "\d tablename" when not using regexes
Date
Msg-id CAGECzQRqysy0eJMKR5he3gwtLrT87f9u5CQQua6B_XNwMnUtFA@mail.gmail.com
Whole thread Raw
Responses Re: psql: Greatly speed up "\d tablename" when not using regexes
Re: psql: Greatly speed up "\d tablename" when not using regexes
Re: psql: Greatly speed up "\d tablename" when not using regexes
List pgsql-hackers
Running "\d tablename" from psql could take multiple seconds when
running on a system with 100k+ tables. The reason for this was that
a sequence scan on pg_class takes place, due to regex matching being
used.

Regex matching is obviously unnecessary when we're looking for an exact
match. This checks for this (common) case and starts using plain
equality in that case.

Attachment

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Speed up clean meson builds by ~25%
Next
From: Robert Haas
Date:
Subject: Re: Issue with the PRNG used by Postgres