Query advice request

From: Mark Kelly <pgsql(at)wastedtimes(dot)net>
To: pgsql-novice(at)postgresql(dot)org
Subject: Query advice request
Date: 2010-10-09 16:09:56
Message-ID: 201010091709.56372.pgsql@wastedtimes.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hi.

I'm wondering if there is a better way to do this:

SELECT news.id FROM news
WHERE news.headline ~* '(japan|office)'
OR news.body ~* '(japan|office)'
ORDER BY news.posted DESC;

It is for small articles; a few hundred or so rows in the table and not
expecting millions.

Cheers,

Mark

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Mladen Gogala 2010-10-09 18:23:51 Re: Query advice request
Previous Message Mark Kelly 2010-10-09 14:51:59 Re: MySQL --> PostgreSQL with PHP