Re: indices - used by which user ?

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Gerhard Hintermayer <g(dot)hintermayer(at)inode(dot)at>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: indices - used by which user ?
Date: 2003-05-07 19:11:56
Message-ID: 20030507121019.B29598-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, 7 May 2003, Gerhard Hintermayer wrote:

> I have two tables (2000-4000 entries each) owned by the postgres
> superuser and built an index on one of them. If I connect to the
> database as user postgres and do a natural inner join on the two tables
> (the index coloumn) the index is used and my query executes at about 80
> ms (verified with explain analyze). If I connect as another user (for
> whom access to the two tables is also granted) and do the same query,
> the index is not used and the query takes ~ 800 ms. Both cases are under
> psql. Additionally, after issuing a \c - <same other user> when
> connected as the not postgres user, the index will be used (very strange).
> I searched the docs, but found no kind of grant, that works on indices.
> Are there any access priveledges on indices or am I missing some other
> point ? Ah, nearly forgot - Version 7.3.1

I don't think there are separate access privs for indexes. Can you give
the schema/query/explain analyze output for the query before and after the
\c - <user> as a comparison point?

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message scott.marlowe 2003-05-07 19:17:42 Re: Restoring 7.3.x Data on 7.2.x Database
Previous Message Scott W. Hill 2003-05-07 18:51:16 Restoring 7.3.x Data on 7.2.x Database