From: Frank Morton <fmorton@base2inc.com>
To: pgsql-sql@postgreSQL.org
Subject: Faster LIKE
Date: Wed, 20 Jan 1999 11:15:21 -0500
Message-ID: <029901be4490$147c4360$8355e5ce@base2inc.com> (raw)
I have an image database with keywords assigned to each record
in the field "keywords" and often do:
select * from images where keywords like 'dog';
which works great with a small database, but slows down quickly
with a large database.
since the "keywords" field can have multiple entries, such as
'dog mammals fuzzy small' I was considering creating a separate
keywords table where each word was an individual row and could
therefore be indexed and fast.
however, in the above example, I would like to match on "mammal"
also (i.e., no "s" on the end) or any substring within the field, so
the separate table does not do it either.
This has to be a common thing. Are there any good solutions or
research out there to solve this problem? Thanks.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: fmorton@base2inc.com
Subject: Re: Faster LIKE
In-Reply-To: <029901be4490$147c4360$8355e5ce@base2inc.com>
References: <029901be4490$147c4360$8355e5ce@base2inc.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox