Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 14C289FB765 for ; Fri, 9 Mar 2007 10:53:16 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-new, port 10024) with ESMTP id 34138-06 for ; Fri, 9 Mar 2007 10:53:04 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from mail.telefor.hu (mail.telefor.hu [193.68.53.97]) by postgresql.org (Postfix) with ESMTP id E22A79FB693 for ; Fri, 9 Mar 2007 10:53:09 -0400 (AST) Received: from telefor-server.int.telefor-new.hu (telefor-server.int.telefor-new.hu [10.0.20.100]) by mail.telefor.hu (Postfix) with ESMTP id EF4F81C093; Fri, 9 Mar 2007 15:53:03 +0100 (CET) Received: from [10.0.20.33] ([10.0.20.33]) by telefor-server.int.telefor-new.hu with Microsoft SMTPSVC(6.0.3790.1830); Fri, 9 Mar 2007 15:53:03 +0100 Message-ID: <45F174CF.8010302@telefor.hu> Date: Fri, 09 Mar 2007 15:53:03 +0100 From: =?UTF-8?B?TWV6ZWkgWm9sdMOhbg==?= Organization: Telefor kft. User-Agent: Thunderbird 2.0b2 (Windows/20070116) MIME-Version: 1.0 To: Richard Huxton CC: pgsql-performance@postgresql.org Subject: Re: Deceiding which index to use References: <45F15F0F.8080403@telefor.hu> <45F1715E.1050000@archonet.com> In-Reply-To: <45F1715E.1050000@archonet.com> Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit X-OriginalArrivalTime: 09 Mar 2007 14:53:03.0743 (UTC) FILETIME=[A3C390F0:01C7625A] X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.301 tagged_above=0 required=5 tests=AWL, BAYES_50, HTML_40_50, HTML_MESSAGE, MIME_HTML_ONLY X-Spam-Level: X-Archive-Number: 200703/194 X-Sequence-Number: 23599 Richard Huxton wrote:
> Mezei Zoltán wrote:
> Q1. Why are you storing a numeric in a varchar?

Because it's not always numeric info. :/

> Q2. How many unique values does anumber have? And how many rows in
> subscriber?

About 10k distinct anumbers and 20k rows. Nothing special...

> Q3. What happens if you create the index on plain (anumber) and then
> test against '555555555'?

Nothing, everything is the same - the problem lies on the other table's index usage, using this index is fine.

Zizi