From: Sergey Zeleniy <1@1plus1.net>
To: pgsql-sql@postgresql.org
Subject: VARCHAR & INDEXES. Context search. Need help.
Date: Thu, 03 Jun 1999 11:19:39 +0300
Message-ID: <37563A9B.32A3DE7A@1plus1.net> (raw)
Hello All!
I have the following table in my database:
+------------+--------------+
|timecode | time |
|description | varchar(250) |
+------------+--------------+
Values of a field "description" looks like "word1 word2 word3...",
"word3 word1 word20...", ...
I need to make queries of the next type:
SELECT <fileds> FROM <table> WHERE description ~* "wordN"
That is get all rows, where the word "wordN" join in string.
But in this case occurs full scan of the table. In the table there are
only ~20000 records, but the search is carried out ~20(!!!) seconds.
It is very long!!! Indexes don't work.
Help me, please, solve this problem!
Thanks.
PS: In the table the records are periodically added...
--
With Best Regards,
Sergio ( Green ).
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: 1@1plus1.net
Subject: Re: VARCHAR & INDEXES. Context search. Need help.
In-Reply-To: <37563A9B.32A3DE7A@1plus1.net>
References: <37563A9B.32A3DE7A@1plus1.net>
* 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