pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedFaster LIKE
2+ messages / 2 participants
[nested] [flat]
* Faster LIKE
@ 1999-01-20 16:15 Frank Morton <fmorton@base2inc.com>
0 siblings, 0 replies; 2+ messages in thread
From: Frank Morton @ 1999-01-20 16:15 UTC (permalink / raw)
To: pgsql-sql
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.
^ permalink raw reply [nested|flat] 2+ messages in thread
* RE: [SQL] Faster LIKE
@ 1999-01-20 16:17 Jackson, DeJuan <djackson@cpsgroup.com>
0 siblings, 0 replies; 2+ messages in thread
From: Jackson, DeJuan @ 1999-01-20 16:17 UTC (permalink / raw)
To: Frank Morton <fmorton@base2inc.com>; pgsql-sql
> 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.
See: pgsql/contrib/fulltextindex
Hope this helps,
-DEJ
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~1999-01-20 16:17 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1999-01-20 16:15 Faster LIKE Frank Morton <fmorton@base2inc.com>
1999-01-20 16:17 RE: [SQL] Faster LIKE Jackson, DeJuan <djackson@cpsgroup.com>
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