Issue with Oracle bind variables not using index properly
问题 In my scenario, the following query runs fast (0.5 seconds on a table with 70 million rows): select * from Purchases where (purchase_id = 1700656396) and, it even runs fast using bind variables: var purchase_id number := 1700656396 select * from Purchases where (purchase_id = :purchase_id) These run fast because I have an index on the purchase_id column. (Keep reading...) I need to create a query that allows "filtering" on arbitrary columns. This means providing several input variables, and