ORACLE DEVELOPER TOOLS FOR VISUAL STUDIO

ORACLE DEVELOPER TOOLS FOR VISUAL STUDIO

Time for a .NET Tune-Up

Tune your .NET application’s use of Oracle Database with Oracle Developer Tools for Visual Studio.

D clause in the query changing dynamically

eveloping a .NET and Oracle applica-

SYSDBA privileges to use Oracle Performance

with every loop. It then fetches all the data typical lifecycle. It includes many steps, such

tion in Microsoft Visual Studio follows a

Analyzer, and the HR user will need the

ADVISOR privilege to use SQL Tuning Advisor.

for each query.

as creating users and roles, assigning

Consider the large query created against privileges, creating tables and stored proce-

The application we will develop requires

the HR.EMPLOYEES, HR.DEPARTMENTS, dures, generating SQL scripts, writing .NET

two new tables based on the HR schema.

HR. EMPLOYEES2, and HR.DEPARTMENTS2 code with Oracle Data Provider for .NET

From Visual Studio, right-click the root

tables. Given that we’re still in the develop- (ODP.NET), and checking everything into

node of Server Explorer and create a new

ment phase without access to real-world pro- source control.

Oracle connection, as HR. Next, right-

duction data, how can we tell if that query will Another important phase of the develop-

click the HR connection and choose Query

perform well? Well, one way is to put it into ment lifecycle involves tuning your applica-

Window . In the query window that opens,

SQL Tuning Advisor and see what comes back. tion’s use of Oracle Database to maximize

enter create table employees2 as

Copy and paste the query from the code performance. Luckily, tools that enhance per-

select * from employees and click the

into the HR query window you opened earlier. formance are among the major new features

execute button (the green arrow in the query

The query in the .NET code is missing a value in Oracle Developer Tools for Visual Studio

window toolbar). Next, erase that statement,

at the end of the WHERE clause, so just add Release 11.1.0.7.20. Oracle Performance

enter create table departments2 as

the number 0 at the end. Your query should Analyzer analyzes your application’s use of

select * from departments , and again

execute the statement.

look like this:

Oracle Database under load and provides recommendations for resolving performance

select employees2.salary problems. SQL Tuning Advisor tunes SQL—

TUNING SQL

from employees2, departments2 both ad hoc SQL typed in at development

To follow along, download the Visual Studio

where employees2.department_id= time and SQL flagged by Oracle Performance

project associated with this article, available

departments2.department_id Analyzer as poorly performing. These tools

at otn.oracle.com/oramag/oracle/10-may/

and employees2.salary <3000 union leverage Oracle Database’s Automatic

o30odpodt.zip. Open the Visual Studio

select employees.salary Workload Repository (AWR) feature, which

project; you’ll see that the bulk of the code

from employees, departments captures database statistics, and Automatic

in the main source file (ReallyBadCode.cs) is

where employees.department_ Database Diagnostic Monitor (ADDM) feature,

shown in Listing 1. Take a close look at it. It

id=departments.department_id which analyzes these statistics and generates

creates a connection pool and then repeat-

and employees.salary =0; recommendations for fixing problems. In this article, we will use these tools to help us clean up a poorly performing applica- tion, aptly named ReallyBadCode.

edly executes a query, with the WHERE

Dokumen yang terkait

ALOKASI WAKTU KYAI DALAM MENINGKATKAN KUALITAS SUMBER DAYA MANUSIA DI YAYASAN KYAI SYARIFUDDIN LUMAJANG (Working Hours of Moeslem Foundation Head In Improving The Quality Of Human Resources In Kyai Syarifuddin Foundation Lumajang)

1 46 7

Analisis Komparasi Internet Financial Local Government Reporting Pada Website Resmi Kabupaten dan Kota di Jawa Timur The Comparison Analysis of Internet Financial Local Government Reporting on Official Website of Regency and City in East Java

19 819 7

FAKTOR-FAKTOR YANG BERPENGARUH TERHADAP PENDAPATAN TENAGA KERJA PENGRAJIN ALUMUNIUM DI DESA SUCI KECAMATAN PANTI KABUPATEN JEMBER The factors that influence the alumunium artisans labor income in the suci village of panti subdistrict district jember

0 24 6

The Correlation between students vocabulary master and reading comprehension

16 145 49

The correlation intelligence quatient (IQ) and studenst achievement in learning english : a correlational study on tenth grade of man 19 jakarta

0 57 61

An analysis of moral values through the rewards and punishments on the script of The chronicles of Narnia : The Lion, the witch, and the wardrobe

1 59 47

Analyzing The Content Validity Of The English Summative Tests In Vocational Schools (A Case Study In Odd Semester Of Second Year Technology Major In Tangerang Vocational Schools)

1 50 155

The Effectiveness of Computer-Assisted Language Learning in Teaching Past Tense to the Tenth Grade Students of SMAN 5 Tangerang Selatan

4 116 138

The correlation between listening skill and pronunciation accuracy : a case study in the firt year of smk vocation higt school pupita bangsa ciputat school year 2005-2006

9 128 37

PENGARUH KOSENTRASI SARI KUNYIT PUTIH (Curcuma zediaria) TERHADAP KUALITAS TELUR ASIN DITINJAU DARI AKTIVITAS ANTIOKSIDAN, TOTAL FENOL, KADAR PROTEIN DAN KADAR GARAM The Addition of White Turmeric (Curcuma zedoaria) Concentrated Base on Quality Antioxidan

1 1 8