Poll Wrap-up – What do you use to select one record from DB?

By | July 10, 2014 | Polls | 1,215 | 0

Poll results for the poll What do you use to select one record from DB? is out. Couple months back I have asked an question to know your preference on what you use when you need to check single record. Total 2820 votes are counted, making this poll the best of votes so far. I believe that everyone is clear on what they like when to select single record.

Results

Total 2820 votes were counted – Making the most popular poll so far and breaking the previous best poll What do you feel about the term ABAPer? record of 1603 votes.

As expected, SELECT SINGLE is the most popular and widely used when it comes select only 1 record. It got around 2265 votes or whopping 80% of overall votes

SELECT UP TO 1 ROWS got remaining 554 votes, 20% of votes.

When to Use the option

If you always use the SELECT SINGLE, you may want to look for the fields in the WHERE clause. If you use the full primary key – all fields of the primary key – you should continue using the SINGLE variant. If your key doesn’t fulfill the full key, than you better of using the UP TO 1 ROWS.

SELECT SINGLE scans all the entries of the table till it finds the match. So, you need to use the FULL KEY to make sure you get the optimal output.

SELECT UP TO 1 ROWS stops searching for next record when it find the matching record and bring back you the result.

On Graph

Results on graph

Tags

Like It? Share!!

Don't miss an Update

Get notified of the new post, right into your inbox

Naimesh Patel{274 articles}

I'm SAP ABAP Consultant for more than a decade. I like to experiment with ABAP especially OO. I have been SDN Top Contributor.
Follow :

Explore all of his 274 articles.

Load comments

Comments on this Post are now closed. If you have something important to share, you can always contact me.

You seem to be new here. Subscribe to stay connected.