简体   繁体   English

Oracle 10g 数据库 Package 响应时间慢

[英]Oracle 10g Database Package Response Time Slow

Recently, I have made another database for separate yearly package.最近,我为单独的年度 package 制作了另一个数据库。 Once I build and put the indexing which we already used in the previous database.一旦我建立并放置了我们已经在以前的数据库中使用的索引。 The problem is the when I run the Package it took too much time to gather the information.问题是当我运行 Package 时,收集信息花费了太多时间。 But when I used the testDB which I used for the developing purpose it works perfectly.但是当我使用我用于开发目的的 testDB 时,它工作得很好。

The only difference which I found is the Cost value which is the change in Production Database and testDB.我发现的唯一区别是成本值,即生产数据库和 testDB 的变化。 在此处输入图像描述

在此处输入图像描述

Run your query on each database with the GATHER_PLAN_STATISTICS hint.使用 GATHER_PLAN_STATISTICS 提示对每个数据库运行查询。 Once that is done, run the following:完成后,运行以下命令:

select * from table(dbms_xplan.display_cursor(null,null,'ALLSTATS LAST'))

This gives you a report on how many rows were processed at each step, and a good indication as to where to focus your tuning efforts.这为您提供了关于在每个步骤中处理了多少行的报告,并很好地指示了您的调优工作的重点。 If you head over to https://asktom.oracle.com and search for "GATHER_PLAN_STATISTICS" you'll see lots of examples on how to use it.如果您前往https://asktom.oracle.com并搜索“GATHER_PLAN_STATISTICS”,您会看到很多示例。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM