Re: [GENERAL] Difference in indexes

2005-11-22 Thread A.j. Langereis
Ok, I didn't look at it from that point of view. It makes it all clear! Thanks for the explanation! Yours, Aarjan Langereis - Original Message - From: "Qingqing Zhou" <[EMAIL PROTECTED]> To: Sent: Tuesday, November 22, 2005 2:23 AM Subject: Re: [GENERAL]

Re: [GENERAL] Difference in indexes

2005-11-21 Thread Qingqing Zhou
""A.j. Langereis"" <[EMAIL PROTECTED]> wrote > > "Bitmap Heap Scan on hosts (cost=2.07..11.34 rows=21 width=59) (actual > time=0.175..0.287 rows=21 loops=1)" > " Recheck Cond: ((hostname)::text = 'Fabian'::text)" > " -> Bitmap Index Scan on hosts_hostname (cost=0.00..2.07 rows=21 > width=0) (

Re: [GENERAL] Difference in indexes

2005-11-21 Thread A.j. Langereis
ame on hosts (cost=0.00..37.28 rows=21 width=59) (actual time=0.068..0.281 rows=21 loops=1)" " Index Cond: ((hostname)::text = 'Fabian'::text)" "Total runtime: 0.492 ms" Yours, Aarjan - Original Message - From: "Qingqing Zhou" <[E

Re: [GENERAL] Difference in indexes

2005-11-21 Thread Qingqing Zhou
""A.j. Langereis"" <[EMAIL PROTECTED]> wrote > > What is happening here? What am I overlooking? The length does not > seem to be the problem: 'FooFooFoo' also uses the index.. > Also the fact whenever there are results or not does not seem to > influence the planner.. > Check out this thread: ht

[GENERAL] Difference in indexes

2005-11-21 Thread A.j. Langereis
Dear all,   I'm using a PostgreSQL 8.1.0 dabase on a Fedora Core 3 machine here. In this table there is a table hosts:   CREATE TABLE hosts(  hostid int4 NOT NULL DEFAULT nextval('hosts_hostid_seq'::regclass),  hostip cidr NOT NULL,  hostname varchar(50),  lastseen timestamp DEFAULT '1970-01