473,385 Members | 1,772 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Performance issue with new 9i database

Hello,
I am seeing huge performance problems on the queries executed against
9i database. I am not too familiar with 9i, But I would like to ask
the DBA to check whether all the parameters are set right to gain
optimum performance.

Currently the default optimizer is set to first_rows.

Most of the queries executed against this database have group by
clause

The tables that I am joining have records less than 5000 (in most
cases)

- Another finding is,
for example:
select ...
from ..
(select
...
from ...
((select a,b,c from ADF, def,ghf
where adf.1 = def.1 etc) 11
(select b,d,e from ADF,def,gjh
where ....
) 22
11.a = 22.a
)

The inner most queries ( that is queries against the tables directly)
comes back very fast. But if I combine them to run the whole query, it
never comes back
Number of records in each table is not more than 3000 and after the
conditions, each of the inner queries comes back with only few hundred
records.

so here is what I did:
I created the table 11 and table 22 with the result set from each of
the sqls above taged as 11 and 22.

Then joined the table 11 and 22 to get the final result set,( by
saying 11.a = 22.a) its very fast and it had only 700 records in
total.

So what could be the problem?

Temp area? sort area? sga? any other parameter that's set wrong?

Our dba is a lazy guy who is not willing to help.

Thanks in advance
Shankar
Jul 19 '05 #1
3 3224
sh*******@gmail.com (Shankar) wrote in message news:<3d**************************@posting.google. com>...
Hello,
I am seeing huge performance problems on the queries executed against
9i database. I am not too familiar with 9i, But I would like to ask
the DBA to check whether all the parameters are set right to gain
optimum performance.

Currently the default optimizer is set to first_rows.

Most of the queries executed against this database have group by
clause

The tables that I am joining have records less than 5000 (in most
cases)

- Another finding is,
for example:
select ...
from ..
(select
...
from ...
((select a,b,c from ADF, def,ghf
where adf.1 = def.1 etc) 11
(select b,d,e from ADF,def,gjh
where ....
) 22
11.a = 22.a
)

The inner most queries ( that is queries against the tables directly)
comes back very fast. But if I combine them to run the whole query, it
never comes back
Number of records in each table is not more than 3000 and after the
conditions, each of the inner queries comes back with only few hundred
records.

so here is what I did:
I created the table 11 and table 22 with the result set from each of
the sqls above taged as 11 and 22.

Then joined the table 11 and 22 to get the final result set,( by
saying 11.a = 22.a) its very fast and it had only 700 records in
total.

So what could be the problem?

Temp area? sort area? sga? any other parameter that's set wrong?

Our dba is a lazy guy who is not willing to help.

Thanks in advance
Shankar


Please do not cross-post

run an explain plan and look to see how Oracle is solving the query

Make sure the Oracle statistics are up to date

run an explain plan on the query after updaing the statistics and
compare to the prior explain

switch the session to all_rows

re-run the explain plan

Now tune the SQL
HTH -- Mark D Powell --
Jul 19 '05 #2
sh*******@gmail.com (Shankar) wrote in message news:<3d**************************@posting.google. com>...
Hello,
I am seeing huge performance problems on the queries executed against
9i database. I am not too familiar with 9i, But I would like to ask
the DBA to check whether all the parameters are set right to gain
optimum performance.

Currently the default optimizer is set to first_rows.

Most of the queries executed against this database have group by
clause

The tables that I am joining have records less than 5000 (in most
cases)

- Another finding is,
for example:
select ...
from ..
(select
...
from ...
((select a,b,c from ADF, def,ghf
where adf.1 = def.1 etc) 11
(select b,d,e from ADF,def,gjh
where ....
) 22
11.a = 22.a
)

The inner most queries ( that is queries against the tables directly)
comes back very fast. But if I combine them to run the whole query, it
never comes back
Number of records in each table is not more than 3000 and after the
conditions, each of the inner queries comes back with only few hundred
records.

so here is what I did:
I created the table 11 and table 22 with the result set from each of
the sqls above taged as 11 and 22.

Then joined the table 11 and 22 to get the final result set,( by
saying 11.a = 22.a) its very fast and it had only 700 records in
total.

So what could be the problem?

Temp area? sort area? sga? any other parameter that's set wrong?

Our dba is a lazy guy who is not willing to help.

Thanks in advance
Shankar


Have you run an EXPLAIN PLAN?

Regards,

Steve
Jul 19 '05 #3
sh*******@gmail.com (Shankar) wrote in message news:<3d**************************@posting.google. com>...
Hello,
I am seeing huge performance problems on the queries executed against
9i database. I am not too familiar with 9i, But I would like to ask
the DBA to check whether all the parameters are set right to gain
optimum performance.

Currently the default optimizer is set to first_rows.

Most of the queries executed against this database have group by
clause

Have you tried any hints? FIRST_ROWS isn't really a good choice for a
GROUP BY query.

The tables that I am joining have records less than 5000 (in most
cases)

- Another finding is,
for example:
select ...
from ..
(select
...
from ...
((select a,b,c from ADF, def,ghf
where adf.1 = def.1 etc) 11
(select b,d,e from ADF,def,gjh
where ....
) 22
11.a = 22.a
)
The above has 3levels of select with two levels of in-line views. And
the parentheses don't seem to match up. What does the real query look
like?
The inner most queries ( that is queries against the tables directly)
comes back very fast. But if I combine them to run the whole query, it
never comes back
Never has no meaning. Do you mean there's no results after
a minute? an hour? a day? How long did you wait?
Number of records in each table is not more than 3000 and after the
conditions, each of the inner queries comes back with only few hundred
records.
Have you tried looking at the explain plan?
And do you really know how many rows are in the base tables? First you
mention under 5000, and here it's 3000. Get some facts together.
so here is what I did:
I created the table 11 and table 22 with the result set from each of
the sqls above taged as 11 and 22.

Then joined the table 11 and 22 to get the final result set,( by
saying 11.a = 22.a) its very fast and it had only 700 records in
total.
So what happens logically in the main query next? (There's one more
level of SELECT... in your "sample")

So what could be the problem?
need more details.

Temp area? sort area? sga? any other parameter that's set wrong?

Our dba is a lazy guy who is not willing to help.

Thanks in advance
Shankar

Before blaming the DB or the DBA, you need to do more research.

A complex query, missing one join condition can easily blow up. You
have at least 3 base tables, used in at least 2 in-line views, judging
from your sample above. If they each have one thousand rows then the
first level seems to have potentially 1,000,000,000 in each of 2 views
which could mean a full join on the next view could have about
1,000,000,000,000,000,000 rows.

Show us the real query or a reasonably small example that has the same
proformance problem.

hth,
ed
Jul 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Seung Y. Kim | last post by:
Hi everyone. I am having a big performance issue with my ASP application with Oracle database. The application itself is a very database-generic one, so I can switch from Access to SQLServer...
6
by: teedilo | last post by:
We have an application with a SQL Server 2000 back end that is fairly database intensive -- lots of fairly frequent queries, inserts, updates -- the gamut. The application does not make use of...
6
by: George McLean | last post by:
Hello, I am trying to isolate some performance issues. The database is DB2 v8.1 running on a Win2000 server with 4 processors and 1gb of RAM. The application is a GIS application that uses...
17
by: 57R4N63R | last post by:
I'm currently building a website for one of the client. There has been few errors here and there, but just recently the problem is getting worse. Basically the symptoms is that when the user try...
8
by: Dmitry Akselrod | last post by:
Hi, I have a recursive application that walks through a directory structure on a Hard Drive and writes various file information to a single table in an Access 2003 database. I am opening a...
4
by: Steph | last post by:
Hi - Trying to chase down a baffling performance issue. Our database has been running very slow lately. So we are performance tuning the database. In doing so, we created a copy of our...
2
by: Brian Tabios | last post by:
Hello Everyone, I have a very complex performance issue with our production database. Here's the scenario. We have a production webserver server and a development web server. Both are running...
2
by: BTabios | last post by:
Hello Everyone, I have a very complex performance issue with our production database. Here's the scenario. We have a production webserver server and a development web server. Both are running...
5
by: Varangian | last post by:
Hi, I have a performance issue question? which is best (in terms of efficiency and performance, I don't care neatness in code)... building an ArrayList of Object Instances using SqlDataReader...
0
by: Shades799 | last post by:
Hi All, I was wondering if any of you could help me with a very difficult problem that I am having. I have an ASP site that works with an Oracle database using an ADODB connection. This...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.