adding column with pgadmin gui takes > 800 secs.

From: "wouter(dot)aukema(at)gmail(dot)com" <wouter(dot)aukema(at)gmail(dot)com>
To: pgadmin-support(at)postgresql(dot)org
Subject: adding column with pgadmin gui takes > 800 secs.
Date: 2006-12-18 10:56:47
Message-ID: 1166439407.717834.158010@n67g2000cwd.googlegroups.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support

I'm having an interesting issue, not sure if it's the server or pgadmin
client:

When trying to add a column (with pgadmin gui) to an already existing
table, a query as shown below is executed on the server:
SELECT format_type(t.oid,NULL) AS typname,
CASE WHEN typelem > 0 THEN typelem ELSE t.oid END as elemoid,
typlen,
typtype,
t.oid,
nspname,
( SELECT COUNT(1)
FROM pg_type t2
WHERE t2.typname = t.typname
) > 1 AS isdup
FROM pg_type t
JOIN pg_namespace nsp ON typnamespace=nsp.oid
WHERE (NOT (typname = 'unknown' AND nspname = 'pg_catalog'))
AND typisdefined AND typtype IN ('b', 'c', 'd')AND typname NOT IN
(SELECT relname FROM pg_class WHERE relnamespace = typnamespace AND
relkind != 'c')
ORDER BY CASE WHEN typtype='d' THEN 0 ELSE 1 END,
(t.typelem>0)::bool, 1

This takes over 800 secs to complete.
Is this normal, against a database with 385 schemas?

(I am posting to this group for the first time, please be kind ;-)

Browse pgadmin-support by date

  From Date Subject
Next Message Roderick A. Anderson 2006-12-19 00:01:42 [Q] (S)RPM for 1.6.1
Previous Message Laurent ROCHE 2006-12-16 10:30:41 Re : No text for error messages only numbers