Skip site navigation (1) Skip section navigation (2)

Re: [despammed] question about index

From: Andreas Kretschmer <akretschmer(at)despammed(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Cc: Andreas Kretschmer <akretschmer(at)despammed(dot)com>
Subject: Re: [despammed] question about index
Date: 2004-12-16 14:15:57
Message-ID: 20041216141557.GA17096@Pinguin.wug-glas.de (view raw or flat)
Thread:
Lists: pgsql-sql
am  16.12.2004, um  8:10:25 -0600 mailte Bruno Wolff III folgendes:
> On Thu, Dec 16, 2004 at 12:01:39 +0100,
>   Andreas Kretschmer <akretschmer(at)despammed(dot)com> wrote:
> > > 
> > > considering that almost 70% of the rows will be with 'VALUE1', 20%
> > > will be with 'VALUE2' and 10% will be with 'VALUE3' on the average.
> > > 
> > > should I create an index to speedup the counts or not ?
> > 
> > Yes.
> 
> Indexes will probably not help in this case. Even when looking at 10% of
> the rows, a sequential scan is still going to be faster than an index
> scan in most cases.

Okay.


Andreas
-- 
Andreas Kretschmer    (Kontakt: siehe Header)
               Tel. NL Heynitz:  035242/47212
GnuPG-ID 0x3FFF606C http://wwwkeys.de.pgp.net
 ===    Schollglas Unternehmensgruppe    === 

In response to

pgsql-sql by date

Next:From: Marcus KrauseDate: 2004-12-16 21:23:23
Subject: get branches & childs from database
Previous:From: Bruno Wolff IIIDate: 2004-12-16 14:10:25
Subject: Re: [despammed] question about index

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group