Re: [BUGS] BUG #4596: information_schema.table_privileges is way too slow

2008-12-29 Thread Peter Eisentraut
On Friday 26 December 2008 01:12:26 Tom Lane wrote: > More generally, there are a *whole lot* of ridiculous inefficiencies > in our information_schema views; I'm surprised there haven't been > more complaints about them. Sometime someone ought to go through > the whole set and see what other refac

Re: [BUGS] BUG #4596: information_schema.table_privileges is way too slow

2008-12-25 Thread Tom Lane
Kirill Simonov writes: > Pavel Stehule wrote: >> really it's should be slow, it's cross join pg_class, pg_authid, pg_authid > Yes, I realize why it's slow. I'm introspecting the database schema, > that's why I need the whole contents of "table_privileges". I suppose I > could obtain the same

Re: [BUGS] BUG #4596: information_schema.table_privileges is way too slow

2008-12-25 Thread Kirill Simonov
Pavel Stehule wrote: really it's should be slow, it's cross join pg_class, pg_authid, pg_authid for fast respond you have to specify minimally table_name and grantor fields. select * from information_schema.table_privileges where table_name = 'foo' and grantor = 'pavel'; Yes, I realize why i

Re: [BUGS] BUG #4596: information_schema.table_privileges is way too slow

2008-12-25 Thread Kirill Simonov
Pavel Stehule wrote: 2008/12/25 Kirill Simonov : Tom Lane wrote: "Kirill Simonov" writes: It takes about 5 minutes to perform the query SELECT * FROM information_schema.table_privileges on an empty database (i.e. with system tables only). Not here. What non-default settings might you be usi

Re: [BUGS] BUG #4596: information_schema.table_privileges is way too slow

2008-12-25 Thread Pavel Stehule
Hello really it's should be slow, it's cross join pg_class, pg_authid, pg_authid for fast respond you have to specify minimally table_name and grantor fields. select * from information_schema.table_privileges where table_name = 'foo' and grantor = 'pavel'; regards Pavel Stehule 2008/12/25, Kir

Re: [BUGS] BUG #4596: information_schema.table_privileges is way too slow

2008-12-25 Thread Pavel Stehule
Really, this view is strange. I'll look on at Pavel 2008/12/25, Kirill Simonov : > Pavel Stehule wrote: >> 2008/12/25 Kirill Simonov : >>> Tom Lane wrote: "Kirill Simonov" writes: > It takes about 5 minutes to perform the query > SELECT * FROM information_schema.table_privileges >>>

Re: [BUGS] BUG #4596: information_schema.table_privileges is way too slow

2008-12-25 Thread Pavel Stehule
2008/12/25 Kirill Simonov : > Tom Lane wrote: >> >> "Kirill Simonov" writes: >>> >>> It takes about 5 minutes to perform the query >>> SELECT * FROM information_schema.table_privileges >>> on an empty database (i.e. with system tables only). >> >> Not here. What non-default settings might you be

Re: [BUGS] BUG #4596: information_schema.table_privileges is way too slow

2008-12-25 Thread Kirill Simonov
Tom Lane wrote: "Kirill Simonov" writes: It takes about 5 minutes to perform the query SELECT * FROM information_schema.table_privileges on an empty database (i.e. with system tables only). Not here. What non-default settings might you be using? Indeed, it is slow because there are a lot

Re: [BUGS] BUG #4596: information_schema.table_privileges is way too slow

2008-12-24 Thread Tom Lane
"Kirill Simonov" writes: > It takes about 5 minutes to perform the query > SELECT * FROM information_schema.table_privileges > on an empty database (i.e. with system tables only). Not here. What non-default settings might you be using? regards, tom lane -- Sent via pgs

[BUGS] BUG #4596: information_schema.table_privileges is way too slow

2008-12-24 Thread Kirill Simonov
The following bug has been logged online: Bug reference: 4596 Logged by: Kirill Simonov Email address: x...@gamma.dn.ua PostgreSQL version: 8.3.5 Operating system: Linux Ubuntu 8.10 Description:information_schema.table_privileges is way too slow Details: It takes ab