DV Query Plan differs between sql and prepared statement queries

Solution Verified - Updated -

Issue

  • Query plan is different for the same query in sql vs prepared Statement.

Environment

  • Red Hat JBoss Data Virtualization (DV) 6.4
  • Prepared Statement with criteria as parameters:
sql = "select * from " +
"Inventory_Detail" +
" WHERE SEARCH = and ITEM_ID in OFFSET 0 ROWS FETCH NEXT 500 ROWS ONLY";
PreparedStatement preparedStatement = conn.prepareStatement(sql);
preparedStatement.setString(1,"FALSE");
preparedStatement.setString(2,"1005014161091");
ResultSet rs = null;

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.