2018 Aug 23 5:30 PM
What is faster in a SELECT....WHERE statement?
objnr+0(2) IN ('PR','NV')
or
(objnr LIKE 'PR%' OR objnr LIKE 'NV%')
2018 Aug 23 6:00 PM
Hi, consider working with below transactions to analyze it
1. SE30 or SAT (Runtime Analysis) transaction
2. ST05 - SQL Trace (Performance Trace) transaction
Attached documentation about SQL Trace
Regards,
2018 Aug 23 10:07 PM
2018 Aug 23 8:39 PM
Did you consider writing a couple of programs to find out? And then maybe publishing a blog with the use case, why it's important to you and the results?
2018 Aug 23 10:58 PM
It depends on the type of database you are using, not ABAP.
Is objnr+0(2) permitted in OpenSQL now?
2018 Aug 24 3:24 PM
Ken,
objnr+0(2) IN ('PR','NV')
Above syntax is disallowed (at least when Oracle is the database). If that is allowed in your installation, it should be easy to write a test program and check for yourself. You can use GET TIME STAMP statement to measure the time.
DATA: l_timestamp_1 TYPE timestampl,
l_timestamp_2 TYPE timestampl,
l_time TYPE timestampl,
t_covp TYPE STANDARD TABLE OF covp.
GET TIME STAMP FIELD l_timestamp_1.
SELECT *
INTO TABLE t_covp
FROM covp
UP TO 100 ROWS
WHERE objnr LIKE 'PR%' OR objnr LIKE 'NV%'.
GET TIME STAMP FIELD l_timestamp_2.
l_time = l_timestamp_2 - l_timestamp_1.
WRITE: / l_timestamp_1, / l_timestamp_2, / l_time.