roedelfroe
Programmer
Hi all,
following problem:
Statement:
select * from some_table
where (A OR B)
AND C
AND D
This statement was running 5 hours. In my opinion (A OR B) is causing this problem.
select * from some_table
where
A
AND C
AND D
OR
B
AND C
AND D
which is logically the same will take only a few seconds to execute.
After all, I would prefer the first statemnt (because of legibility and to keep the code as small as possible).
Any hints, how I could make the first statement faster?
Thx in advance
Roland
following problem:
Statement:
select * from some_table
where (A OR B)
AND C
AND D
This statement was running 5 hours. In my opinion (A OR B) is causing this problem.
select * from some_table
where
A
AND C
AND D
OR
B
AND C
AND D
which is logically the same will take only a few seconds to execute.
After all, I would prefer the first statemnt (because of legibility and to keep the code as small as possible).
Any hints, how I could make the first statement faster?
Thx in advance
Roland