Re: Improving the performance of psql tab completion - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Improving the performance of psql tab completion
Date
Msg-id 26591.1349879823@sss.pgh.pa.us
Whole thread Raw
In response to Re: Improving the performance of psql tab completion  (Merlin Moncure <mmoncure@gmail.com>)
Responses Re: Improving the performance of psql tab completion  (Stephen Frost <sfrost@snowman.net>)
List pgsql-hackers
Merlin Moncure <mmoncure@gmail.com> writes:
> On Wed, Oct 10, 2012 at 8:45 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> How much does this help?
>> 
>> update pg_proc set procost = 10 where proname = 'pg_table_is_visible';

> hm, it fixes the problem.  Also, at least for 9.2, the procost is
> still set at one (just looked).  Well, thanks!

Yeah, I'm not sure why this got dropped on the floor last time it was
discussed, but I'm pretty sure we had consensus to ratchet up the costs
of all the foo_is_visible functions.  The problem (at least when I try
your query here) is that the planner doesn't know enough to run the
is_visible test last among the filter conditions.

There was also some discussion of fixing the name-check to be indexable,
which the substring hack isn't.  That would take a bit of work though.

Anyway, the procost change is trivial and would remain helpful even with
the other fix, so I'll go make that change in HEAD later today.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: Switching timeline over streaming replication
Next
From: Amit Kapila
Date:
Subject: Re: Behavior for crash recovery when it detects a corrupt WAL record