Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YVMT9-0005GT-W6 for pgsql-sql@arkaria.postgresql.org; Tue, 10 Mar 2015 15:53:20 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YVMT9-0007wW-ET for pgsql-sql@arkaria.postgresql.org; Tue, 10 Mar 2015 15:53:19 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YVMT8-0007wQ-PK for pgsql-sql@postgresql.org; Tue, 10 Mar 2015 15:53:18 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by magus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YVMT4-0003Yu-U9 for pgsql-sql@postgresql.org; Tue, 10 Mar 2015 15:53:17 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id F026120098 for ; Tue, 10 Mar 2015 11:53:11 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute2.internal (MEProxy); Tue, 10 Mar 2015 11:53:13 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=aklaver.com; h= x-sasl-enc:message-id:date:from:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; s=mesmtp; bh=le6HGtXjyTw2z0IwArnoU1Br+eM=; b=Sdt80PWVM8FjxlRrfl LJdShAIO5JW3RSLaGhJLTP8svTCNf8pkd4n9sjxLtjlUcPplGdKhWzNyfw2JagE5 ohf0c3AuUQJvu5/Ash+VafvAm1M4njY7u5EMtwnfQ4HapCbqTToy7QSNmD3ILRtI COoO5N4zQs/ikrH0flTtPdYxg= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=x-sasl-enc:message-id:date:from :mime-version:to:subject:references:in-reply-to:content-type :content-transfer-encoding; s=smtpout; bh=le6HGtXjyTw2z0IwArnoU1 Br+eM=; b=Z2kmcYbOwWDsAEzYPOQ/wGGWxwW+JHYn7qFJob46wWLtyGZopYgvXs vbARc3B0hBspzXuq0xEAMz+LP82F/67YS4D5S6Qth6GM2PGXdAUfNZQUEcBwzWsW UiiuJnLELUmQEbu0ZL0ax+GRkE4z7GNwtGZwSJP6A2MGCx6+LaM0Q= X-Sasl-enc: nSjm7XMWNVMng2At9LlqcNEN20v4F6kzEiD4A2HitU8Z 1426002793 Received: from killi.site (unknown [24.17.179.185]) by mail.messagingengine.com (Postfix) with ESMTPA id 15B1A680228; Tue, 10 Mar 2015 11:53:12 -0400 (EDT) Message-ID: <54FF136B.3080909@aklaver.com> Date: Tue, 10 Mar 2015 08:53:15 -0700 From: Adrian Klaver User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: sramay , pgsql-sql@postgresql.org Subject: Re: Strange Query - Reg References: <1425890133399-5841071.post@n5.nabble.com> In-Reply-To: <1425890133399-5841071.post@n5.nabble.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.7 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-sql Precedence: bulk Sender: pgsql-sql-owner@postgresql.org 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