Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id D2CC22F420D for ; Fri, 13 Jan 2012 14:09:14 -0400 (AST) Received: from mail-gy0-f174.google.com ([209.85.160.174]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1RllYw-0006Gg-MZ for pgsql-performance@postgresql.org; Fri, 13 Jan 2012 18:09:15 +0000 Received: by ghbg16 with SMTP id g16so1019394ghb.19 for ; Fri, 13 Jan 2012 10:09:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; bh=q1r4CodSv4I8a/n4MRxnotwxV0A7BlG0Qt9S4BgWuUc=; b=P+vbLMm8+9BloN7DYG1KSETZAqNXGj/9mZav+GCytCPIyArRLrtlf6AWRuHmeIAb8Y QkhHIBQQDw+AtH9vcf5QmCWKdkRXCzO7Lfxm5DMJGyXA+bNUplQnpB+S3NKoNmQITNVB y5GsNe0QJm9M/LYZGiBBwUzixXKsKAMmoqsYY= Received: by 10.236.168.37 with SMTP id j25mr3046441yhl.92.1326478142391; Fri, 13 Jan 2012 10:09:02 -0800 (PST) Received: from [192.168.1.50] ([187.23.11.84]) by mx.google.com with ESMTPS id i12sm25151058anm.6.2012.01.13.10.09.01 (version=SSLv3 cipher=OTHER); Fri, 13 Jan 2012 10:09:01 -0800 (PST) Message-ID: <4F10733B.3000704@gmail.com> Date: Fri, 13 Jan 2012 16:08:59 -0200 From: alexandre - aldeia digital User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20111124 Thunderbird/8.0 MIME-Version: 1.0 To: pgsql-performance@postgresql.org Subject: Discovering the most searched values for a field Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.6 (--) X-Archive-Number: 201201/44 X-Sequence-Number: 46057 Hi, Is there a simple way (or a tool) to discover the most searched values in a field from a table ? In the pg_stats, I can see the most common values generated by ANALYZE, but I want to know how many queries are using this values. With this information and the other statistics, I want to create partial indexes or use table partitioning to create some benchmarks to speed up the database access. Best regards.