I am doing some work that involves a large table view (COVP). The view has somewhere in the region of 7 million entries and growing.
I have been doing some tests on selecting data from the view.
If I use the statement
SELECT * FROM covp INTO TABLE t_covp WHERE objnr EQ 'OR000002000571'.
the select has a duration of 183,411,192 (accoring to the trace log).
If I use the statement
SELECT * FROM covp INTO TABLE t_covp WHERE objnr EQ 'OR000002000571' AND lednr EQ '00'.
the select only has a duration of 24,591 (according to the trace).
Both select statements return the same result set (6 records).
Obviously, the first select takes far to long. My question is, why is there such a large difference in run times. Neither of the fields are key fields.
Am I missing something?