agora inbox for pgsql-sql@postgresql.org
help / color / mirror / Atom feedStrange Query - Reg
4+ messages / 3 participants
[nested] [flat]
* Strange Query - Reg
@ 2015-03-09 08:35 sramay <nic.srama@gmail.com>
2015-03-09 08:36 ` Re: Strange Query - Reg sramay <nic.srama@gmail.com>
2015-03-10 15:53 ` Re: Strange Query - Reg Adrian Klaver <adrian.klaver@aklaver.com>
2015-03-14 14:20 ` Re: Strange Query - Reg bricklen <bricklen@gmail.com>
0 siblings, 3 replies; 4+ messages in thread
From: sramay @ 2015-03-09 08:35 UTC (permalink / raw)
To: pgsql-sql
Hi,
In my postgresql instance in both 9.2 and 9.4 ( community version). I am
getting the following query executed
often ( most of the time). Why? The query is seems to be related to
catalog management? Why it happens
can any one give light in this regard?
SELECT NULL AS TABLE_CAT, n.nspname AS TABLE_SCHEM, ct.relname AS
TABLE_NAME, NOT i.indisunique AS NON_UNIQUE, NULL AS INDEX_QUALIFIER,
ci.relname AS INDEX_NAME, CASE i.indisclustered WHEN true THEN 1
ELSE CASE am.amname WHEN 'hash' THEN 2 ELSE 3 END END AS
TYPE, (i.keys).n AS ORDINAL_POSITION, pg_catalog.pg_get_indexdef(ci.oid,
(i.keys).n, false) AS COLUMN_NAME, CASE am.amcanorder WHEN true THEN
CASE i.indoption[(i.keys).n - 1] & 1 WHEN 1 THEN 'D' ELSE 'A'
END ELSE NULL END AS ASC_OR_DESC, ci.reltuples AS CARDINALITY,
ci.relpages AS PAGES, pg_catalog.pg_get_expr(i.indpred, i.indrelid) AS
FILTER_CONDITION FROM pg_catalog.pg_class ct JOIN pg_catalog.pg_namespace
n ON (ct.relnamespace = n.oid) JOIN (SELECT i.indexrelid, i.indrelid,
i.indoption, i.indisunique, i.indisclustered, i.indpred,
i.indexprs, information_schema._pg_expandarray(i.indkey) AS keys
FROM pg_catalog.pg_index i) i ON (ct.oid = i.ind
Thanking you in advance,
Regards
Ramachandran S
--
View this message in context: http://postgresql.nabble.com/Strange-Query-Reg-tp5841071.html
Sent from the PostgreSQL - sql mailing list archive at Nabble.com.
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Strange Query - Reg
2015-03-09 08:35 Strange Query - Reg sramay <nic.srama@gmail.com>
@ 2015-03-09 08:36 ` sramay <nic.srama@gmail.com>
2 siblings, 0 replies; 4+ messages in thread
From: sramay @ 2015-03-09 08:36 UTC (permalink / raw)
To: pgsql-sql
Hi,
Funny thing is that the database size is just below 100 MB.
Regards
Ramachandran S
--
View this message in context: http://postgresql.nabble.com/Strange-Query-Reg-tp5841071p5841072.html
Sent from the PostgreSQL - sql mailing list archive at Nabble.com.
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Strange Query - Reg
2015-03-09 08:35 Strange Query - Reg sramay <nic.srama@gmail.com>
@ 2015-03-10 15:53 ` Adrian Klaver <adrian.klaver@aklaver.com>
2 siblings, 0 replies; 4+ messages in thread
From: Adrian Klaver @ 2015-03-10 15:53 UTC (permalink / raw)
To: sramay <nic.srama@gmail.com>; pgsql-sql
On 03/09/2015 01:35 AM, sramay wrote:
> Hi,
>
> In my postgresql instance in both 9.2 and 9.4 ( community version). I am
> getting the following query executed
> often ( most of the time).
Where are you seeing the query?
What is often, every minute, every hour,etc?
Why? The query is seems to be related to
> catalog management? Why it happens
> can any one give light in this regard?
Not without more information:
1) What applications do you have using the Postgres instances?
2) Do you have monitoring software set up?
3) Are there queries before or after this one that might help shed a
clue on what is sending the query?
>
>
> SELECT NULL AS TABLE_CAT, n.nspname AS TABLE_SCHEM, ct.relname AS
> TABLE_NAME, NOT i.indisunique AS NON_UNIQUE, NULL AS INDEX_QUALIFIER,
> ci.relname AS INDEX_NAME, CASE i.indisclustered WHEN true THEN 1
> ELSE CASE am.amname WHEN 'hash' THEN 2 ELSE 3 END END AS
> TYPE, (i.keys).n AS ORDINAL_POSITION, pg_catalog.pg_get_indexdef(ci.oid,
> (i.keys).n, false) AS COLUMN_NAME, CASE am.amcanorder WHEN true THEN
> CASE i.indoption[(i.keys).n - 1] & 1 WHEN 1 THEN 'D' ELSE 'A'
> END ELSE NULL END AS ASC_OR_DESC, ci.reltuples AS CARDINALITY,
> ci.relpages AS PAGES, pg_catalog.pg_get_expr(i.indpred, i.indrelid) AS
> FILTER_CONDITION FROM pg_catalog.pg_class ct JOIN pg_catalog.pg_namespace
> n ON (ct.relnamespace = n.oid) JOIN (SELECT i.indexrelid, i.indrelid,
> i.indoption, i.indisunique, i.indisclustered, i.indpred,
> i.indexprs, information_schema._pg_expandarray(i.indkey) AS keys
> FROM pg_catalog.pg_index i) i ON (ct.oid = i.ind
>
> Thanking you in advance,
>
> Regards
>
> Ramachandran S
>
>
>
> --
> View this message in context: http://postgresql.nabble.com/Strange-Query-Reg-tp5841071.html
> Sent from the PostgreSQL - sql mailing list archive at Nabble.com.
>
>
--
Adrian Klaver
adrian.klaver@aklaver.com
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Strange Query - Reg
2015-03-09 08:35 Strange Query - Reg sramay <nic.srama@gmail.com>
@ 2015-03-14 14:20 ` bricklen <bricklen@gmail.com>
2 siblings, 0 replies; 4+ messages in thread
From: bricklen @ 2015-03-14 14:20 UTC (permalink / raw)
To: sramay <nic.srama@gmail.com>; +Cc: pgsql-sql
On Mon, Mar 9, 2015 at 1:35 AM, sramay <nic.srama@gmail.com> wrote:
>
>
> SELECT NULL AS TABLE_CAT, n.nspname AS TABLE_SCHEM, ct.relname AS
> TABLE_NAME, NOT i.indisunique AS NON_UNIQUE, NULL AS INDEX_QUALIFIER,
> ci.relname AS INDEX_NAME, CASE i.indisclustered WHEN true THEN 1
> ELSE CASE am.amname WHEN 'hash' THEN 2 ELSE 3 END END AS
> TYPE, (i.keys).n AS ORDINAL_POSITION,
> pg_catalog.pg_get_indexdef(ci.oid,
> (i.keys).n, false) AS COLUMN_NAME, CASE am.amcanorder WHEN true THEN
> CASE i.indoption[(i.keys).n - 1] & 1 WHEN 1 THEN 'D' ELSE 'A'
> END ELSE NULL END AS ASC_OR_DESC, ci.reltuples AS CARDINALITY,
> ci.relpages AS PAGES, pg_catalog.pg_get_expr(i.indpred, i.indrelid) AS
> FILTER_CONDITION FROM pg_catalog.pg_class ct JOIN pg_catalog.pg_namespace
> n ON (ct.relnamespace = n.oid) JOIN (SELECT i.indexrelid, i.indrelid,
> i.indoption, i.indisunique, i.indisclustered, i.indpred,
> i.indexprs, information_schema._pg_expandarray(i.indkey) AS keys
> FROM pg_catalog.pg_index i) i ON (ct.oid = i.ind
>
Are you running PgAdmin or another GUI client app?
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2015-03-14 14:20 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2015-03-09 08:35 Strange Query - Reg sramay <nic.srama@gmail.com>
2015-03-09 08:36 ` sramay <nic.srama@gmail.com>
2015-03-10 15:53 ` Adrian Klaver <adrian.klaver@aklaver.com>
2015-03-14 14:20 ` bricklen <bricklen@gmail.com>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox