We had our oracle server choking during processing a select statement with close to 3500(!!) bind variables.
This select is, obviously, built dynamically by code that we can't change. During the execution of this select the db server went to 100% cpu usage and our system almost halted.
We know how to reproduce this problem. So we can prevent this specific condition. But I am wondering if there is a way to protect the db ( by configuration) from this type of problems.
Update:
The select looks like that:
SELECT "FieldOfChar20"
FROM "TableOf111Krows"
WHERE ( "FieldOfChar20" BETWEEN :a0 AND :a1
OR "FieldOfChar20" BETWEEN :a2 AND :a3
OR "FieldOfChar20" BETWEEN :a4 AND :a5
snip snip
OR "FieldOfChar20" BETWEEN :a290 AND :a291
OR "FieldOfChar20" BETWEEN :a292 AND :a293
)
OR ( "FieldOfChar20" IN
(:a294,
:a295,
snip snip
:a1292,
:a1293
)
OR "FieldOfChar20" IN
(:a1294,
:a1295,
snip snip
:a2292,
:a2293
)
OR "FieldOfChar20" IN
(:a2294,
:a2295,
snip snip
:a3292,
:a3293
)
OR "FieldOfChar20" IN
(:a3294,
:a3295,
snip snip
:a3476,
:a3477
)
)
Oracle version is 10.2.0.2