[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnumed-devel] darn ! sensitive vs. insensitive searching
From: |
Karsten Hilbert |
Subject: |
[Gnumed-devel] darn ! sensitive vs. insensitive searching |
Date: |
Mon, 31 Mar 2003 21:46:17 +0200 |
User-agent: |
Mutt/1.3.22.1i |
Can you please try running this against your version of
PostgreSQL ? I am using 7.1:
gm-archive=# explain select id, lastnames, firstnames from names where
lastnames ~ '^becker' and firstnames ~ '^k';
NOTICE: QUERY PLAN:
Index Scan using idx_names_last_first on names
(cost=0.00..2.54 rows=1 width=28)
EXPLAIN
gm-archive=# explain select id, lastnames, firstnames from names where
lastnames ~* '^becker' and firstnames ~* '^k';
NOTICE: QUERY PLAN:
Seq Scan on names (cost=0.00..1821.34 rows=1 width=28)
EXPLAIN
gm-archive=#
How can we work around this ? Is it reasonable to assume that
the user always types in the *beginning* of the name parts ?
IOW, to the users amongst us: Do we almost always type in the
starting letters of a name when we search for it ? Or do we
often search for arbitrary parts inside a name ? I'd assume
not so.
Karsten
--
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnumed-devel] darn ! sensitive vs. insensitive searching,
Karsten Hilbert <=