The result of this query is 0 lines since this is a SRV and not a GW/GSW. If I drop the "ASC LIMIT 1" from the query I get the answer in no time.
This is a known bug, which is fixed in trunk.
The patch can be found in http://metanav.uninett.no/hg/default/rev/b2d0a4699bb1
I hope somebody with more SQL-knowledge than me can come up with a fix, since this is quite annoying.
Quick fix:
CREATE INDEX cam_netboxid_start_time_btree ON cam USING btree (netboxid, start_time);
Try that one and see if that fixes the problem.
- Kristian