Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dikVn-0002TW-ET for pgsql-admin@arkaria.postgresql.org; Fri, 18 Aug 2017 16:52:43 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dikVm-0002a5-Su for pgsql-admin@arkaria.postgresql.org; Fri, 18 Aug 2017 16:52:42 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dikU0-0007kp-PE for pgsql-admin@postgresql.org; Fri, 18 Aug 2017 16:50:52 +0000 Received: from mwork.nabble.com ([162.253.133.43]) by magus.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dikTx-00024U-QU for pgsql-admin@postgresql.org; Fri, 18 Aug 2017 16:50:52 +0000 Received: from mben.nabble.com (unknown [162.253.133.72]) by mwork.nabble.com (Postfix) with ESMTP id 7E1E45D528D1D for ; Fri, 18 Aug 2017 09:50:47 -0700 (MST) Date: Fri, 18 Aug 2017 09:50:47 -0700 (MST) From: anand086 To: pgsql-admin@postgresql.org Message-ID: <1503075047520-5979024.post@n3.nabble.com> Subject: Analyze Table MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org Hello All, We have a requirement wherein, analyze table needs to be called from within the application. To give a background, we have schema called "dev" under which all the tables are created, then we have "dev_dba" user which has been granted ownership of all tables and then we have "dev_user" (application user) accessing the data from the java application. The application code run as dev_user, needs to analyze the table in case application does truncate and insert data (~ 10 millions rows). As per my understanding, only the owner of the table can analyze the table and we do not want to make "dev_user" the owner. What is the best possible way to get the table analyzed from application code without changing granting owner to dev_user? Thank you for your time. Regards, Anand -- View this message in context: http://www.postgresql-archive.org/Analyze-Table-tp5979024.html Sent from the PostgreSQL - admin mailing list archive at Nabble.com. -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin