Sei sulla pagina 1di 4

What is the difference between Sequential Read and Direct Read?

It is a very common misconception that "sequential reads in SM50 means that a full table
scan is executed and an index is not used". The correct definition/concept is:

Direct read

The term "Direct read" refers to accesses in which a maximum of one line is returned by the
database. This includes summarization queries such as SELECT COUNT and fully-qualified
primary key accesses.

Sequential Read

A "Sequential Read" refers to all other read database accesses, in which there may be more
than one line returned. It is true that the term "Sequential read" is a little deceptive since it
implies that blocks are always read sequentially (as in a full table scan). In reality, however,
when you perform a trace on these queries you will see that index is used in most cases.

So, "Direct read" and "Sequential read" in SM50 are worthless for a performance analysis. It
only shows that the processes are running and processing one of the queries directed at the
database interface.

For expensive SQL statements analysis, "Reads/User Calls" value (TCODE BACOCKPIT or
ST04OLD) is an indication. If this value is above 15, the SQL statements should be checked
in detail.

What is the function of Redo Log and Redo Log buffer?


The primary function of the redo log is to record all the changes made to data. Changes made to entries
are written to the on-line redo log files. So that they can be used in roll forward operations during
database recovery.
When a change has happened, the entry will be first stored in the SGA. SGA has the following
components:
1. Shared pool
2. Database buffer cache (DB cache)
3. Redolog Buffer
4. Large pool
5. Java Pool

Shared pool, consists of shared SQL area and shared PL/SQL area. DB cache will have the most recently
used blocks & the blocks that needs to be written to the datafile. Redolog Buffer contains the
changed/redo data and Large pool is used only in parallel sever environment.
The SGA may also use a Java pool, if java stored procedures are used.
When a SQL statement is executed, the output (data) will be stored in these DB cache as dirty blocks,
and then moved into redo log buffers, which will be updated at a later stage.

What is the difference between V1 and V2 update?

In SAP, the update process will be performed in several steps. The time-critical part of an update is called
a V1 update, and the non-time-critical part is called as V2 update.

The V1 update will be handled by the UPD work processes (UPD: Update process for making V1 (time-
critical) database changes) and the V2 will be handled by the UP2 work process (UP2: Update process
for executing V2 (not time-critical) database changes).

To view the status of these updates, use transaction SM13. However, if you see any failed updates, find
out the root cause and advise the users to perform the task again rather than posting it back from SM13.

View the following link to know more about the V1 and V2 update:

http://help.sap.com/saphelp_nw04s/helpdata/en/e5/de86f335cd11d3acb00000e83539c3/content.htm

What is the function of ARCH?

Archive (ARCH) copies the on-line redo log files to archival storage when they are full. ARCH is active
only when a database redo log is used in ARCHIVELOG mode.

What is the difference between Open SQL & Native SQL?

Open SQL allows you to access all database tables known to the SAP system, regardless of the database
manufacturer. Sometimes, however, we may want to use database-specific SQL statements called Native
SQL in the ABAP/4 program.
To avoid incompatibilities between different database tables and also to make ABAP/4 programs
independent of the database system in use, SAP has created a set of separate SQL statements called
Open SQL. Open SQL contains a subset of standard SQL statements as well as some enhancements
which are specific to SAP.

A database interface translates SAP's Open SQL statements into SQL commands specific to the
database in use. Native SQL statements access the database directly.

Explain the terms Primary index, and Secondary index?

Primary Index: The primary index contains key fields of a table and a pointer to non-key fields of the table.
The primary index is created automatically when a table is created in database and moreover you can
further define reference to the primary index which are known as Secondary index.

What is the difference among dropping a table, truncating a table and deleting all records
from a table?

Drop Table - will remove the existance of the table from the database along with its data and structure and
all the constraints. The table will be no longer available. This is an DDL Statement.

Truncate Table - will remove all the rows from a table. It will not delete the table. Its a DDL statement that
means the deleted rows cannot be reverted back by ROLLBACK statement. It will only be used if users
needs to delete the entire rows from a tabls. No conditions will be applied in Truncate.

Delete Table - is a DML statement which will delete rows from a table according to the matching criteria
mentions in the where clause and these rows can be reverted back by ROLLBACK statement if
COMMIT is not fired. Delete statement will used in both the cases, eitehr selected rows or entire rows
from tables.
What are indexes?

Indexes are described as a copy of a database table reduced to specific fields. This data exists in sorted
form. This sorting form ease fast access to the field of the tables. In order that other fields are also read, a
pointer to the associated record of the actual table are included in the index. Yhe indexes are activated
along with the table and are created automatically with it in the database.

Potrebbero piacerti anche