Re: Slow tab completion w/ lots of tables - Mailing list pgsql-hackers

From Stephen Frost
Subject Re: Slow tab completion w/ lots of tables
Date
Msg-id 20120821154443.GG1267@tamriel.snowman.net
Whole thread Raw
In response to Re: Slow tab completion w/ lots of tables  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: Slow tab completion w/ lots of tables
List pgsql-hackers
Robert,

* Robert Haas (robertmhaas@gmail.com) wrote:
> On Thu, Aug 16, 2012 at 10:37 PM, Stephen Frost <sfrost@snowman.net> wrote:
> >   When doing tab-completion under 9.1, pg_table_is_visible(oid) is slow
> >   and is ending up as the first thing tested against all the rows
> >   in pg_class.  Increasing the cost of pg_table_is_visible() up to
> >   10 causes it to move to the end of the tests, which improves things
> >   greatly- I thought there was a plan to make that the default..?
> >
> >   This is with 9.1.4.
>
> Is this a regression versus earlier releases, or just a bad thing in general?

It's really a regression- in prior releases, we had the
pg_table_is_visible() test later in the WHERE clause, so that call
wasn't invoked as often.  This all happened when Tom reworked the psql
SQL calls to be defined in an array instead of in-line'd (which was a
good change, but moved pg_table_is_visible() up to the front of the
WHERE clause, slowing things down).
Thanks,
    Stephen

pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: New statistics for WAL buffer dirty writes
Next
From: Robert Haas
Date:
Subject: Re: GetSnapshotData() comments