Академический Документы
Профессиональный Документы
Культура Документы
It is a widely known fact that 80% of performance problems are a direct result of the application code. There are other factors that contribute to poor performance, such as server configuration, resource contention, and other issues that we have described in previous chapters. Assuming you have tuned your servers and followed the guidelines for your database server, application server, and web server, most of your performance problems can be addressed by tuning the PeopleSoft Application code. Tuning the application can consist of tuning, PeopleCode, SQR code, SQL-intensive code, queries, nVision, and indexes. In This Article, we will focus on Indexing and Temporary Tables Ineffective Indexing One of the most common performance problems in the PeopleSoft Application is ineffective indexing against key application tables. As we stated earlier, the PeopleSoft software is delivered with a generic code set that runs on several database platforms. In addition to the code set, the indexes that exist are not specific to any one environment. Because of this, you need to fine-tune your application by selectively finding poor performing applications and determining whether or not the cause is due to ineffective indexing. This can be achieved by tracing the SQL of poor performing pages, application engine programs, COBOL, or sqr programs and finding the long running queries. Once you find the problematic queries that take a significant amount of time to complete, you will need to analyze the indexes that are being used. Here is an example of how to fine-tune your indexes. The Journal Generator application, within the Financials software, could be a COBOL application (FSPGJGEN) that performs very many selects based on the run control id parameters. In running this process it is determined that it is taking approximately 2 hours to process only 50 Journals. The first thing to do is to turn on tracing for that specific process and re-running the process in your test environment. Be sure that you always do your tuning in your test environment. You do not want to blindly start adding indexes to your production environment without performing full regression testing. The results can be catastrophic. Once you have the trace file, you can examine it and look for the timings for the long running queries. After examining the trace file we find the SQL statement that is causing the performance problem. Once you find the SQL statement, you can run it through your RDBMS query tool to determine which indexes are being used. If you are using SQL Server, you will issue the following command: SET SHOWPLAN_ALL { ON | OFF } If you are using Oracle you will utilize the explain plan. Once you execute this command, you can then run your select statement. This returns detailed information about how the statements are executed and provides estimates of the resource requirements for the statements, including the indexes that are being utilized. The next step is to look at the columns in the where clause of the SQL statement and determine if the indexes being used, if any, contain these columns. If they do not, you can simply create a new index with the missing columns. Once created re-run your query to re-examine the index usage. Simply repeat this process until you achieve the improved performance. In some cases, certain SQL statements will never even use an Index. This is what is called a full table scan. Full table scans are extremely taxing on the system and cause major performance degradation. If you determine that a SQL query is performing a full table scan, simply create an Index or Indexes with the columns that are contained within the where clause. Tuning and adding indexes is one of the most overlooked and very simple ways to improve performance. Just remember the following steps.