Home » SQL & PL/SQL » SQL & PL/SQL » Ways of optimizing codes
Ways of optimizing codes [message #225906] Wed, 21 March 2007 21:40 Go to next message
dpong
Messages: 73
Registered: January 2007
Member
Hi there,

I'm wondering if there are ppl. out there who has experience optimizing codes to

    a) make the script run faster (like optimized hints, subsetting initial datasets.)

    b) minimize its burden on the database by, e.g., minimizing the number of blocks writes.


Could anyone give me any suggestions?
Re: Ways of optimizing codes [message #225907 is a reply to message #225906] Wed, 21 March 2007 21:43 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
SQL> ALTER SESSION SET _MAKE_SQL_FASTER=TRUE
Re: Ways of optimizing codes [message #225955 is a reply to message #225907] Thu, 22 March 2007 01:54 Go to previous messageGo to next message
rleishman
Messages: 3728
Registered: October 2005
Location: Melbourne, Australia
Senior Member
Yes, there are such people out there. Many of them publish books under the topic of "Performance Tuning". Most of these books can be purchased in bookshops or even over the Internet.

Other resources are available for free, such as the Oracle Performance Tuning Guide and this web site. Other resoources could almost certainly be found using a Search Engine.

A small number of these people (but not necessarily the same ones that publish the books) also read and reply to forums such as this one, and will occasionally post suggestions and even solutions to specific performance tuning questions.

Ross Leishman
Re: Ways of optimizing codes [message #226109 is a reply to message #225906] Thu, 22 March 2007 09:56 Go to previous messageGo to next message
gintsp
Messages: 118
Registered: February 2007
Senior Member
1) Throw away anything that is redundant (you won't believe how much I've seen absolutely redundant code in general case!).
2) Identify the slowest/most resource eating statement/block and start to examine and improve it.

Gints Plivna
http://www.gplivna.eu
Re: Ways of optimizing codes [message #226194 is a reply to message #225906] Thu, 22 March 2007 16:06 Go to previous message
tplank
Messages: 7
Registered: March 2007
Junior Member
One other suggestion you might try is to just start using EXPLAIN PLAN for everything. You will learn a lot by letting it drive the questions you are asking. Do an EXPLAIN, then look up anything you don't understand. Performance is such a huge generic topic, you can spend forever reading (not that this is an inherently bad thing). Plus you will be looking at the plans for your real code and applying what you learn directly.
Previous Topic: Updating one table with data from other table..
Next Topic: Populating 200 column values an existing row to a new row via trigger
Goto Forum:
  


Current Time: Fri Feb 14 09:29:18 CST 2025