On Wed, Oct 29, 2008 at 5:04 PM, Irene Barg <ibarg@xxxxxxxx> wrote: > Hi, > > Is the following query a valid use of the 'wildcard' in (='2008-10-27%')? > >> [arcsoft@dsan4 arcsoft]$ psql metadata >> Password: Welcome to psql 8.1.9, the PostgreSQL interactive terminal. >> >> metadata=# SELECT * FROM viewspace.siap AS t WHERE >> t."startDate"='2008-10-27%' AND t.prop_id LIKE '%' LIMIT 1000; > > Causes the %CPU to jump and process lingers for over an hour. Bad move. dates aren't strings, and their format can change based on what you've got set for datestyle. If you want a start date (that's a date or a timestamp) then use the proper operators where startDate='2008-10-27' If startDate is a text / varchar type then you need to change it to a date. storing dates in strings is bad. -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general