tags: regex

Action executed in 0.000

Each Tag


Common tags - number of posts

index (2), PostgreSQL (2),

2 way join

index, regex, PostgreSQL, regex

3 way join

PostgreSQL, index, regex


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