tags: index, regex

Action executed in 0.000

Each Tag

index, regex

Common tags - number of posts

PostgreSQL (4), trigram (1), code (1), ack (1), Po (1), search (1), string (1),

3 way join

PostgreSQL, index, regex

Sub groups 1

ack, code, index, search (1), Po, index, string, trigram (1)


select * from depesz; » Blog Archive » speeding up like ‘%xxx%’

DSHL logo

as most of you know postgresql can easily speedup searches using:

general idea is to use some kind of full text search/indexing – tsearch, lucene, sphinx, you name it.

but sometimes you can’t install fts/fti, or it doesn’t really solve your problem. is there any help? let’s find out.

url: http://www.depesz.com/index.php/2007/09/15/speeding-up-like-xxx/

type: article, format: blog


select * from depesz; » Blog Archive » indexable ” field like ‘%something’”

DSHL logo

for the long time everybody knew that you can’t use index on “LIKE” operations.

then came text_pattern_ops, so we could use indexes for prefix searches:

but what if i’d like to search for ‘%something’? not prefix, but suffix. in my example – what can i do to use indexes when searching for people from given domain?

url: http://www.depesz.com/index.php/2007/07/30/indexable-field-like-something/

type: article, format: blog