Details
Description
SQL queries using the OR operator were taking a long time during the WHERE clause compilation phase when a large number of OR clauses (~50k) are used.
The key observation was that during the AND/OR processing, when there are a large number of OR expression nodes the same set of extracted nodes was getting added.
Thus bloating the set size and slowing down the processing.