> 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" ---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faqs/FAQ.html