![]() It is more efficient to use the former to pull the data from DB to internal table rather than performing APPEND within SELECT…ENDSELECT. The fields are needed in a different order the not all fields are needed and INTO does not work because gaps would appear. When accessing pool and cluster tables, these should be accessed using the full primary keyĪvoid placing a ‘SELECT’ or ‘SELECT SINGLE’ in a loop to minimize the number of database requests Thus, if several records may be returned and we want to get the highest record for example, SELECT SINGLE cannot be used, but SELECT … UP TO 1 ROWS WHERE … ORDER BY … may be used. The only difference is the ABAP syntax prevents from using ORDER BY with SELECT SINGLE, but it is allowed with SELECT … UP TO 1 ROWS. With ORACLE database system, SELECT SINGLE is converted into SELECT … UP TO 1 ROWS, thus they are exactly the same in that case. In order to check for the existence of a record then it is better to use SELECT SINGLE than using SELECT … UP TO 1 ROWS since it uses low memory and has better performance. It may not be unique, if there are more matching rows for the given condition. SELECT SINGLE and SELECT UP TO n ROWS return the first matching row/rows for the given condition. SELECT SINGLE requires one communication with the database system whereas SELECT * requires two. If you are interested in exactly one row of a database table or view, use the SELECT SINGLE statement instead of a SELECT * statement. Wherever possible, fields should be specified rather than SELECT *. For example, if application requires cumulative sales figures for a month in APJ.Ĭare needs to be taken while selecting a proper match □ When the having clause is used, the aggregates and groups are constructed in the database instead of the application server, thereby reducing the resulting set. Effective use of the having clause can reduce the set of data transferred from the database to the application server. In a SELECT statement, the HAVING clause allows you to specify a logical condition for the groups in a GROUP-BY clause. Check that the internal table used in FOR ALL ENTRIES is NOT empty as this will retrieve all entries from the table So, if the JOIN is between two tables where the JOINING KEYS are key fields JOIN is recommended over FOR ALL ENTRIES. If the JOIN is being made on fields which are key fields in both the tables, it reduced program overhead and increases performance. JOINS are recommended to be used till 5 joins. Use secondary index / Create secondary index if accessing a database table with non-key fields depending on the frequency of usage and volume of data accessed. Table should not have a unique secondary index.A secondary index should not have more than 4 fields.Table should not have more than 4 secondary indexes if the data class is APPL0. ![]() ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |