I have a code in UNIVERSE database which selects records from a table but when I use “OR” statement it takes 20 times more.
Example:
I want to select records with 2 different status codes “A” or “H” and with “user”.
When I run:
Select TABLE with USER = "username" AND WITH STATUS = "A"
It takes milliseconds to finish.
Also when I run:
Select TABLE with USER = "username" AND WITH STATUS = "H"
It also takes milliseconds to finish.
But when I run:
Select TABLE with USER = "username" AND WITH STATUS = "H" OR WITH STATUS = "A"
It takes over 20 seconds!!
I tried the select statement in different format but as soon as it contains “OR” the time slows to over 20 seconds.
Running the statement in Telnet produces the same outcome.
Thank you for any help.
2