Skip site navigation (1) Skip section navigation (2)

Re: slow information schema with thausand users, seq.scan pg_authid

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org, andrew(at)supernews(dot)com
Subject: Re: slow information schema with thausand users, seq.scan pg_authid
Date: 2006-02-06 18:29:10
Message-ID: 28046.1139250550@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> Andrew - Supernews wrote:
>> Perhaps you missed the fact that the query was not one that he wrote,
>> but is the query that psql uses for \ds ?

> I did miss that.  Perhaps with dependency tracking and all, we don't 
> need the left joins anymore?

I don't see anything wrong with leaving the left joins as-is, on the
grounds that

1. the planner can simplify the left joins to inner joins, eg the
join to pg_namespace should be simplified on the strength of the
test on nspname.  (This seems to be broken in HEAD, but it does
work in 8.1 --- I think I broke it with the changes to treat IN
as a ScalarArrayOp.  Will fix.)

2. HEAD also knows how to change the order of the left joins at need.

The real question to me is why the planner doesn't want to use the
index on pg_authid.oid.  That's pretty curious ...

			regards, tom lane

In response to

pgsql-hackers by date

Next:From: Scott MarloweDate: 2006-02-06 18:37:53
Subject: Re: autovacuum
Previous:From: James William PyeDate: 2006-02-06 18:25:05
Subject: Re: Copy From & Insert UNLESS

pgsql-patches by date

Next:From: Stephen FrostDate: 2006-02-06 18:55:20
Subject: Re: [HACKERS] Krb5 & multiple DB connections
Previous:From: Peter EisentrautDate: 2006-02-06 17:21:46
Subject: Re: slow information schema with thausand users, seq.scan pg_authid

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group