From: | Richard Huxton <dev(at)archonet(dot)com> |
---|---|
To: | gnanam(at)zoniac(dot)com |
Cc: | pgsql-performance(at)postgresql(dot)org |
Subject: | Re: How to boost performance of queries containing pattern matching characters |
Date: | 2011-02-14 07:39:33 |
Message-ID: | 4D58DC35.8010007@archonet.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
On 14/02/11 07:28, Gnanakumar wrote:
>> Is that really what you are after? Or, did you just want to match:
>> user1(at)domain(dot)com
>> user2(at)sub(dot)domain(dot)com
>
> I understand that because I've (%) at the beginning and end, it's going to
> match unrelated domains, etc., which as you said rightly, it is
> wide-ranging. But my point here is that how can I improve performance of
> the queries containing pattern matching characters.
If you really need to match all those options, you can't use an index. A
substring-matching index would need to have multiple entries per
character per value (since it doesn't know what you will search for).
The index-size becomes unmanageable very quickly.
That's why I asked what you really wanted to match.
So, I'll ask again: do you really want to match all of those options?
--
Richard Huxton
Archonet Ltd
From | Date | Subject | |
---|---|---|---|
Next Message | Gnanakumar | 2011-02-14 07:46:07 | Re: How to boost performance of queries containing pattern matching characters |
Previous Message | Artur Zając | 2011-02-14 07:38:48 | Re: How to boost performance of queries containing pattern matching characters |