Richard Huxton provided the answer: It's a prepared query-plan,
which means it can't plan to use the index because the next EXECUTE
might have reconciled=true.
Bryce Nesbitt wrote:
...Which is all good. But the Hibernate version
of query still takes several seconds, and still appears in my pg_log
slow query log:
LOG: duration: 2248.662 ms statement: EXECUTE C_51443
[PREPARE:
select count(vehicleeve0_.VEHICLE_EVENT_ID) as x0_0_ from
EG_VEHICLE_EVENT vehicleeve0_ where (vehicleeve0_.CSO_ID=$1
)and(vehicleeve0_.RECONCILED=$2 )]