JDBC automatical query turned to be very slow

后端 未结 5 1933
一向
一向 2021-02-10 10:57

I am maintaining an application creating an Oracle DB via JDBC. Starting from today this query:

SELECT  NULL                                                   AS         


        
5条回答
  •  死守一世寂寞
    2021-02-10 11:41

    1. Use oracle EXPLAIN PLAN http://docs.oracle.com/cd/B10500_01/server.920/a96533/ex_plan.htm (use the result to find the bottleneck and re-write or change your query to run faster). enter image description here
    2. Make sure you are using indexes on your tables and your indexes are updated.
    3. use partitioning.
    4. clean up some of the data that you don't need anymore
    5. use hibernate if you can (this may not be a easy thing to do if this is a legacy application) because it optimizes your query for you and you won't need to write JDBC query.
    6. Lastly take a look at oracle performance tunning document http://docs.oracle.com/cd/E11882_01/server.112/e41573/perf_overview.htm#PFGRF02503

提交回复
热议问题