Beta 2 logging

Поиск
Список
Период
Сортировка
Искать

Beta 2 logging

От:
Kieran McCusker <kieran.mccusker@kwest.info>
Дата:
Hi again

I was going to look at the SQL that produces the view or table when you click on it in the UI as it seems a little sluggish in our (admittedly large 5000+ views and tables) database. Enabling logging I got the following (at least for views and tables). The query (I've marked in bold) appears to be cut off mid-sentence....

Cheers

Kieran


2009-04-01 15:44:28 STATUS : Retrieving View details...
2009-04-01 15:44:28 QUERY  : Set query (kwest:5432): SELECT att.*, def.*, pg_catalog.pg_get_expr(def.adbin, def.adrelid) AS defval, CASE WHEN att.attndims > 0 THEN 1 ELSE 0 END AS isarray, format_type(ty.oid,NULL) AS typname, tn.nspname as typnspname, et.typname as elemtypname,
  cl.relname, na.nspname, att.attstattarget, description, cs.relname AS sername, ns.nspname AS serschema,
  (SELECT count(1) FROM pg_type t2 WHERE t2.typname=ty.typname) > 1 AS isdup, indkey, inha.attrelid::regclass AS inhrelname,
  EXISTS(SELECT 1 FROM  pg_constraint WHERE conrelid=att.attrelid AND contype='f' AND att.attnum=ANY(conkey)) As isfk
  FROM pg_attribute att
  JOIN pg_type ty ON ty.oid=atttypid
  JOIN pg_namespace tn ON tn.oid=ty.typnamespace
  JOIN pg_class cl ON cl.oid=att.attrelid
  JOIN pg_namespace na ON na.oid=cl.relnamespace
  LEFT OUTER JOIN pg_type et ON et.oid=ty.typelem
  LEFT OUTER JOIN pg_attrdef def ON adrelid=att.attrelid AND adnum=att.attnum
  LEFT OUTER JOIN pg_description des ON des.objoid=att.attrelid AND des.objsubid=att.attnum
  L
2009-04-01 15:44:29 QUERY  : Set query (kwest:5432): SELECT rw.oid, rw.*, relname, CASE WHEN relkind = 'r' THEN TRUE ELSE FALSE END AS parentistable, nspname, description,
       pg_get_ruledef(rw.oid, true) AS definition
  FROM pg_rewrite rw
  JOIN pg_class cl ON cl.oid=rw.ev_class
  JOIN pg_namespace nsp ON nsp.oid=cl.relnamespace
  LEFT OUTER JOIN pg_description des ON des.objoid=rw.oid
 WHERE ev_class = 25967555
 ORDER BY rw.rulename
2009-04-01 15:44:29 STATUS : Retrieving View details... (0.72 secs)

Re: Beta 2 logging

От:
Dave Page <dpage@pgadmin.org>
Дата:
On Wed, Apr 1, 2009 at 3:55 PM, Kieran McCusker
 wrote:
> Hi again
>
> I was going to look at the SQL that produces the view or table when you
> click on it in the UI as it seems a little sluggish in our (admittedly large
> 5000+ views and tables) database. Enabling logging I got the following (at
> least for views and tables). The query (I've marked in bold) appears to be
> cut off mid-sentence....

There's a 1K buffer in some of the logging functions. I've increased that to 8K.

Thanks!

-- 
Dave Page
EnterpriseDB UK:   http://www.enterprisedb.com

FAQ