Re: [GENERAL] how to enforce index usage with +0

2007-06-13 Thread Andrew Sullivan
On Sun, Jun 10, 2007 at 05:32:55AM -0700, Timasmith wrote: > select s.order_id > from small_orders_table s, orders o > where s.find_these_id in > (select some_id from some_table where some_indexed_field = 'ABC') > and s.order_id+0 = o.order_id > and date_trunc('microseconds', o.valid_until_dt) <

[GENERAL] how to enforce index usage with +0

2007-06-12 Thread Timasmith
Hi, In Oracle there are instances when as a developer I know how the data is spread in the tables and I want to be sure the database uses the right index. Does the following hold true in Postgresql for a query like this: select s.order_id from small_orders_table s, orders o where s.find_these_id