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

regular expression and index on 7.2

From: Holger Dörl <holger(dot)doerl(at)web(dot)de>
To: pgsql-bugs(at)postgresql(dot)org
Subject: regular expression and index on 7.2
Date: 2002-04-25 22:21:02
Message-ID: 200204252221.g3PML1v11983@mailgate5.cinetic.de (view raw or flat)
Thread:
Lists: pgsql-bugs
Hi,

I tried the following on 7.1.3-38 and pgsl used the index:

EXPLAIN
mp3base=# explain
mp3base-# select * from mp3_
mp3base-# where name ~ '^cre';
NOTICE:  QUERY PLAN:

Index Scan using mp3_name on mp3_  (cost=0.00..8.14 rows=10 width=28)

On an other machine I've a psql 7.2-1 and I got this result:

mp3base=# explain
mp3base-# select * from mp3_
mp3base-# where name ~ '^cre';
NOTICE:  QUERY PLAN:
 
Seq Scan on mp3_  (cost=0.00..2150.93 rows=363 width=794)
 
On both machines is this index:
CREATE INDEX "mp3_name" ON mp3_(name);

Do you have any idea why it dosn't work with 7.2 ????
And what can I do to use the index ????
(7.2 runs on a mandrake and 7.1.3 on suse
 both databases are created as: createdb -E LATIN1 mp3base

Thx Holger

______________________________________________________________________________
Keine verlorenen Lotto-Quittungen, keine vergessenen Gewinne mehr!
Beim WEB.DE Lottoservice: http://tippen2.web.de/?x=7


Responses

pgsql-bugs by date

Next:From: Tom LaneDate: 2002-04-26 14:59:22
Subject: Re: regular expression and index on 7.2
Previous:From: pgsql-bugsDate: 2002-04-25 20:27:53
Subject: Bug #649: JDBC support won't compile

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