"Worky Workerson" <worky.workerson@xxxxxxxxx> writes: > I'm wondering (given what I have read about PG and IN), if there is a > better way to execute this query. > ... (as I have partitioned the events table by ip): Are you on 8.2? 8.1 is pretty stupid about joins to inheritance trees. regards, tom lane