| From: | Francois Suter <dba(at)paragraf(dot)ch> |
|---|---|
| To: | Martijn van Oosterhout <kleptog(at)svana(dot)org> |
| Cc: | <pgsql-general(at)postgresql(dot)org>, Paul Thomas <paul(at)tmsl(dot)demon(dot)co(dot)uk> |
| Subject: | Re: Optimisation, index use question [long] |
| Date: | 2003-07-14 07:47:43 |
| Message-ID: | BB382CBF.406C%dba@paragraf.ch |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
> Standard issue. When you specify an unquoted number in a query it's
> interpreted as an int4 which doesn't match your indexes. Suggestions are:
>
> - Put quotes around your numbers or eg. '1'
> - Cast them to the right type eg. 1::bigint
Huh, yeah, I remember now reading about this. Thanks a lot.
Still any idea about why isn't it faster to query on the primary key than on
the two foreign keys?
Cheers
--------
Francois
Home page: http://www.monpetitcoin.com/
"We waste our time spending money we don't have to buy things we don't need
to impress people we don't like"
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Martijn van Oosterhout | 2003-07-14 07:57:15 | Re: different transaction handling between postgresql and oracle/mysql |
| Previous Message | Jörg Schulz | 2003-07-14 07:47:30 | different transaction handling between postgresql and oracle/mysql |