X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 89DA8D1F2E1 for ; Thu, 6 May 2004 12:45:09 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 22973-07 for ; Thu, 6 May 2004 12:44:45 -0300 (ADT) Received: from web13125.mail.yahoo.com (web13125.mail.yahoo.com [216.136.174.143]) by svr1.postgresql.org (Postfix) with SMTP id B5A4AD1F2C9 for ; Thu, 6 May 2004 12:44:44 -0300 (ADT) Message-ID: <20040506154443.82425.qmail@web13125.mail.yahoo.com> Received: from [63.78.248.48] by web13125.mail.yahoo.com via HTTP; Thu, 06 May 2004 08:44:43 PDT Date: Thu, 6 May 2004 08:44:43 -0700 (PDT) From: Litao Wu Subject: Re: pg_stat To: Litao Wu , pgsql-performance@postgresql.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200405/50 X-Sequence-Number: 6881 All, Since I have not seen any follow up post, I am wondering if my question is not clear or what. Anyway, my postgres version is 7.3.2, and I want to know: 1. How to determine if some of indexes are used by any queries, like Oracle's: alter index my_index monitoring usage 2. The relationship between "number of index scans done" and "Number of disk block fetch requests for index" as shown in the query. Thank you! --- Litao Wu wrote: > Hi, > > I have query: > select pg_stat_get_numscans(76529669), > pg_stat_get_blocks_fetched(76529669), > pg_stat_get_blocks_hit(76529669); > > The result is: > pg_stat_get_numscans | pg_stat_get_blocks_fetched | > pg_stat_get_blocks_hit > ----------------------+----------------------------+------------------------ > 0 | 23617 | > > 23595 > (1 row) > > My questions are: > 1. How can index disk blocks be requested (either > from disk or cache) without index scan? > 2. If I want to check if an index is used after > pg_stat_reset(), how can I get it? By number of > scans > or block requests, or some other ways? > > Thanks, > > > > > __________________________________ > Do you Yahoo!? > Win a $20,000 Career Makeover at Yahoo! HotJobs > http://hotjobs.sweepstakes.yahoo.com/careermakeover > __________________________________ Do you Yahoo!? Win a $20,000 Career Makeover at Yahoo! HotJobs http://hotjobs.sweepstakes.yahoo.com/careermakeover