Which one is better, regarding performance point of view.

Hi friends,
I have a report, which has 10 columns.
Now in order to pull data for all 10 columns, i need to access 8 tables.
Ex.. open ref_cursor for
select col1, col2, col3,.. col10
from table1, table2, table3.. table8
now i use 3 of those tables for getting column2.
Is it better to call another function (which returns this value) to pull this column2 or is it better to just join the tables to get this column?
Does using a function decrease the performance ?
Thank you
Jack

I would say try to construct the query using just SQL if at all possible. If you are attempting to do procedural operations on the data that cant be achieved through standard SQL (via case statements and the like), you probably don't have much of a choice other than to using a function or procedure. At any rate, there really isn't enough information to tell you which is better. My process for designing programs, jobs, reports, or queries tends to follow the same process when I am working solo:
1. Outline what I want on paper
2. Outline how to get it on paper
3. Create a rough draft in pseudo code
4. Write the actual code
5. Verify that I am getting consistent and correct results
6. Trace the job, program, or query in the database using a 10046 trace or, If it is pl/sql, profile it using DBMS_PROFILER
7. For 10046, I profile the trace file using a profiler of some sort (usually not tkprof unless I am working with a single statement)
8. Review the profile for issues, bugs, or poorly performing queries
I basically use the response time profiling methodology (I like this text for response time optimization techniques: Optimizing Oracle Performance, Millsap/Holt, Oreilly 2003) to identify the issues. If I determine the SQL is the issue, it is time to break out a harness tool (a tool that captures statement level execution statistics) to help me test alternatives. After I have tuned the query to my satisfaction, I repeat steps 5-8.
Please note, this is a very broad overview of my personal process and may not meet your needs. There are plenty of other considerations when designing or troubleshooting when performance improvement is the goal.

Similar Messages

  • Which is better from performance point of view : Enum or String?

    Hello All
    While working to re-factor code so as to improve performance,I saw that repeatedly some Strings are used to be put as keys in a HashMap.
    Will there be an improvement in performance if I assign use enums in place of using double quoted strings everytime.
    Also,Is it a better idea to use string constants rather than enums.
    Can anyone help me over this?
    Thanks in advance
    Mansi

    Found an article in Java performance tuning book.But they nowhere mentioned the perfect reason for doing this.Here's the artice :
    Enumerating constants
    Another canonicalization technique often used is replacing constant objects with integers. For example, rather than use the strings "female" and "male", you should use a constant defined in an interface:
    public interface GENDER
    public static final int FEMALE=1;
    public static final int MALE=2;
    Used consistently, this enumeration can provide both speed and memory advantages. The enumeration requires less memory than the equivalent strings and makes network transfers faster. Comparisons are faster too, as the identity comparison can be used instead of the equality comparison. For example, you can use:
    this.gender == FEMALE;
    instead of:
    this.gender.equals("female");

  • Create custom forms using code or SAP B1 Studio, which one is better?

    Hello Professionals,
    I'm new to SAP B1 9.0 SDK, i'm currently creating forms using code, but i noticed that it can be mad using SAP Business Studio,
    from your experience, which one is better for performance and quality wise?.
    Your help would be greatly appreciated
    Thanks in advance

    Hi Karem,
    http://www.mepa.ch/images/documentation/B1_90_WorkWithStudioSuite.pdf
    Please Refer The Link and Start Working with Studio..
    All the best
    Regards,
    Mayank Shah   

  • Business Delegate- JSP or JSP- JavaBean, which one is better?

    My current approach is to use a struts action to call a business delegate(pojo) which will go to the session facade and get database info then the JSP simply becames a FETCHER(which helps on reusablity since I can use them for many tables), but I also know I could use struts action to just simply forward to a JSP then retrive the info via JavaBean->EjbSessionFacade
    I'm confused which one is better for performance, scalability, maintainability, etc

    Whatever flow you are following is generally used flow and its correct aslo. Dont think its a bad design. One more think you have to look into is, minimize the remote calls as much as possible. Instead of doing many remote calls you can use EJB local object to process all your business logic and finally you can come out using single Remote call for a process. Look after this.. it will improve performance.

  • For developer's point of view which one is better- 10g or 11g

    guys please help me out.
    let me konw from developer's point of view which one is better 11g or 10g.
    i want to apply for oracle.

    user9342767 wrote:
    guys please help me out.
    let me konw from developer's point of view which one is better 11g or 10g.
    i want to apply for oracle.Assuming you are talking about Oracle Database 10g and Oracle Database 11g, and not any of the other products that use the brands 10g and 11g (and assuming you want to discuss that here instead of the appropriate product forum where it belongs), here are some of my thoughts:
    - if you are not using any 11g features, nor any new-in-10g features that have been fixed in 11g, it does not matter;
    - if you are using 11g features, then 11g is the way to go;
    - if you want (or want your customers to have) regular support past July of this year, go 11g;
    - if you want the latest fixes in the optimizer, go 11g;
    - if you want to save yourself code by using database features, look at the docs and see whether they will help.

  • Which design is best from a performance point of view?

    Hello
    I'm writing a small system that needs to track changes to certain columns on 4 different tables. I'm using triggers on those columns to write the changes to a single "change register" table, which has 12 columns. Beacuse the majority of tracked data is not shared between the tables, most of the columns will have null values. From a design point of view it is apparent that having 4 separate change register tables (one for each main table that is being tracked), would be better in terms of avoiding lots of null columns for each row, but I was trying to trade this off against having a single table to see all changes that have been made across the tracked tables.
    From a performance point of view though, will there be any real difference whether there are 4 separate tables or 1 single register table? I'm only ever going to be inserting into the register table, and then reading back from it at a later date and there won't be any indexes on it. Someone I work with suggested that there would be more overhead on the redo logs if a single table was used rather than 4 separate tables.
    Any help would be appreciated.
    David

    The volumes of data are going to be pretty small,
    maybe a couple of thousand records each day, it's an
    OLTP environment with 150 concurrent users max.Consider also the growing of data and if you'll put data constantly to an historical db or if the same tables will contain the increasing number of record.
    The point that my colleague raised was that multiple
    inserts into a single table across multiple
    transactions could cause a lot of redo contention,
    but I can't see how inserting into one table from
    multiple triggers would result in more redo
    contention that inserting into multiple tables. The
    updates that will fire the triggers are only ever
    going to be single row updates, and won't normally
    cause more than one trigger to fire within a single
    transaction. Is this a fair assumption to make?
    David
    I agree with you, the only thing I will consider, instead of redo problem, is the locking on the table that could be generated when logs of different tables will have to be put in a single table, i mean if after insert of a log record you could need to update it....
    In this case if 2 or more users have to update the same log you could have problems.

  • Which one works better?

    Does Sims 3 work better on a 15" mbp with lion or mountain lion. And also which one works better with a 13" mbp?

    I just got off the phone with tech support regarding my E1200 also.  They were basically no help at all and I got frustrated with them doing the lets perform two hundred steps to prove you are not a blooming idiot first and that our product is not at fault.  I repeatedly stated that I am a computer consultant and ruled out all the easy stuff already.  I have thirty years of experience .  But still they proceed with ruling out the idiot possibilities for a good thirty minutes until I decide to end the ever growing worthless conversation.
    I would suggest you try to reflash the firmware using the TFTP utility. 
    If that doesn't work, return the product to the store.
    DonB2

  • Shutdown or Sleep, which one is better??

    I usually use my Mac Mini about 3 hours a day. At the end of the day, should I shutdown the machine or simply put it in sleep mode? Which one is better? What is the difference?
    Mac Mini   Mac OS X (10.4.6)  

    791/3237
    Hi Snawman,
    I agree with the others. In your case, better shut it down for saving energy.
    "Which one is better? What is the difference?":
    - Sleep allows to very quickly resume any task that was running. Leave all applications, documents etc open, they'll just be here at the same place, in the same state, as when you left your computer.
    It's just a matter of quickly going back to work, not having to retype some websites login passwords for example, etc.
    - On the wear and tear point of view, the difference is so small, your Mini will be obsolete and replaced with a newer Mac, far before something breaks down just because of to many cold boots!
    Yes, the most demanding task for a computer's hardware (and probably OS too), is a cold boot.
    Sleep, instead of Shutdown, keeps your computer components from a lot of temperature fluctuations, and the hard disk too just spins down, instead of completely setting itself down, then up again from scratch (and cold).
    Again,
    these differences exist, but they are not so important that you would take them into account and change your energy saving habits.
    - Macs are well designed to cope with many different kinds of users/usages.
    "About running yourself the nightly automatic maintenance":
    In case you didn't know already about this: yes, just open Terminal and paste this command
    sudo periodic daily weekly monthly
    once or twice a month.
    In order to make sure all three maintenance tasks run until the end, after you entered your admin password and hit Return, just leave Terminal open like 15 minutes or so (until you see its prompt again).
    There is no hurry to quit it, as the maintenance runs in the background: Just use your computer in the meanwhile.
    Enjoy your Mac!
    Axl

  • Which one is better EP with ABAP or EP with Java

    Hi Experts,
    Please tell me Which one is better EP with ABAP or EP with Java for learning and useful in USA?
    Regards
    Jana

    What programming background do you already have?  You should match up the flavor of Web Dynpro that matches the skill sets you already have?  Do you have ERP or other Business Suite experience already?  If so you will find that WDA is often used in conjunction with the Business Suite and WDJ used for composites.  So consider where your business domain experience and knowledge lies and support that as well.

  • Netbeans or Eclipse.. which one is better?

    Hi people, I am new in Java development and I want to know your opinion about IDEs. Which one is better? Eclipse or Netbeans or another one you can suggest?
    By the way, I have had a question about BASEDIR thing.. Whatever I have done couldnt solve my problem, but I have known that it was very much related with my old system, I have had other serious problems as well. So I made a radical choise and changed my technology and passed from 98 to XP and over 1 night all of my problems dropped magically! I had to do this...
    Thank you for all your suggestions and time :)
    Have a beautiful day...
    Gulsum

    On;
    ``...Quite frankly, I have never seen anyone post advice about compiling and running programs that actually knows the rules correctly. Every time I compile a program with packages, it seems I have to add a new tip to my long list of tips for getting programs to compile. As far as I can tell, the "expert approach" is to include every possible path that could possibly pertain to the program in the -classpath and hope that works....``
    Why is it that much a problem to compile and run? .. as you say too, in worst case, put everything on background (I think classpath here in Java terminology), in anycase the program must be compiled and run, as long as it finds everything it refers to... huh? If my logic is correct, then why still its a hard point to compile and run a program?
    And as to the personal development approaches, both have their own cons and pros... In dr.s approach (which in general the approach of the elders that come from legacy technologies and learn everything from scratch and robustly) you sweat a lot but become tough in long term.... in your approach, its much more pragmatic and logical to make a quick start and to go on to develop yourself in long term... in general I like to learn something by all its aspects, but its related with your resources (mostly time) to spend, as well as your mentality.
    And by the way corlettk, the ``God botherer`` term rolled me on the floor :) Actually I am one of them as well and I think he loves to hear our voices like a daddy loves his baby's :) At least I love Him...
    And yes your right... another example for hearing yourself is turning the questions of the people to them back.. and they CAN answer their own question %90.. well... %90 may be a litte exaggerated :) .. lets say a lot.

  • Which one is better null == object or object == null

    I am just surffing on a google and i found one new thing which is new concept to me, but that concept is not cleared
    Concept is, i found one place a class object is compaired with the null in following way
    if( null == object)
    Usually i used
    if(object == null)
    Problem :- What is the diffrance between these two condition and which one is better?

    yawmark wrote:
    corlettk wrote:
    So... Just use the first way (by default) because that's how people are it reading accustomed to.Agreed. Just to point out, the reason commonly given for preferring (null == object) is that it prevents semantic errors such as (object = null), which is only a problem in Java in a minuscule number of cases.And the practice started in C (or maybe even an earlier language) where it's an issue in many cases. For example,
    int i = 0;
    if (i = 1) { ... }The "if" line is illegal in Java, but it's legal in C. If the programmer forgets the second = sign, then you get the above. Variable i gets a value of 1, and the expression i = 1 has a value of 1, which corresponds to true (whereas in Java, you can't use an int where a boolean is expected). So the if comes out true, when it should have been false (had we properly used if (i == 1)), and in addition, the value of i has changed when we didn't want it to.
    In Java, this would be a compile-time error, whereas in C, it's a runtime error. Compile-time errors are easier to fix, and they don't get the opportunity to cause a problem after the software has been released.
    In C, to turn this back into a compile time error, you could get in the habit of writing if (1 == i) Then if you forget the second = sign, you get if (1 = i) which is a compile-time error.
    Because Java doesn't equate numerical zero with false and non-zero with true, this issue is, as yawmark demonstrates, much less of a problem in Java.

  • Creating default Row which one is better option

    hi,
    for creating dummy row in ViewObject which one is better and appropriate option..
    1) CreateInsert as default activity
    2) Creating row in Create method of ViewObjectImpl
    Regards
    Kiran
    Edited by: Kiran S on Aug 26, 2010 4:38 AM

    Kiran,
    CreateInsert is an action that is exposed via a data control. If you invoke this action, it will call the Create method of your View Object, so your question really doesn't make sense. If you need to have a row created and inserted into the row set of a VO, then using the CreateInsert action in a task flow will work just fine.
    John

  • I am going to buy a macbook pro for grade 12, and I need to know wheather I should get a macbook pro or a macbook pro retina. If someone could tell me (in a very simple way) which one is,better for me and why, I would be ever so apprreciative.

    I am going to buy a macbook pro for grade 12, and I need to know wheather I should get a macbook pro or a macbook pro retina. If someone could tell me (in a very simple way) which one is,better for me and why, I would be ever so apprreciative.

    Why do you need a expensive MacBook Pro?
    Your attending high school and unless everyone else is rich also your likely going to be a target by the more poorer students for theft or damage to the machine.
    You could keep it home, but if you need it for class then your exposed again.
    Also at that age your not very careful yet, a MacBook Pro is a expensive and easily damaged machine.
    Unless your made of money and so are others at your school, I would recommned a low profile, just does the job cheap Windows PC.
    If it dies, gets lost, stolen or damaged because of your inexperince handling senstivie electronics then it's no big deal.
    You can buy a Mac later on when your sure you have a need for it, currently there isn't much advantage of owning a Mac compared to a PC, they do just about the same things now, one just looks prettier than the other.
    Since 95% of the world uses Windows PC's your going to have to install Windows on the Mac in order to keep your skills up there or be unemployed, so it's a extra headache and expense.
    good luck

  • File Adapter or File  Transport which one will give more performance

    Hi all,
    File Adapter or File Transport which one will give more performance ? in OSB?
    Which one to select any one did performance analysis?
    Thanks
    Phani

    Why don't you just go read some benchmarks?
    http://www.barefeats.com/mbpp18.html

  • I am looking for macbookpro mid 2010 HDD exact specs so that i can upgrade it to 1TB. PLEASE HELP ME  about OEM apple brand or which one is better.Thanks

    I am looking for macbookpro mid 2010 HDD exact specs so that i can upgrade it to 1TB. PLEASE HELP ME  about OEM apple brand or which one is better?.Thanks

    clintonfrombirmingham Your information is not correct.
    http://kb.sandisk.com/app/answers/detail/a_id/8142/~/difference-between-sata-i,- sata-ii-and-sata-iii
    I have a sata II samsung 5400 rpm and i am only able to transfer at 85 read right speed.
    On my main drive sata III ocz agility 3 ssd i get 120 mb read and 180 write.
    Neither of these come close to the 300 mb promised. So it wont matter if he got sata II or III
    The speed came from Blackmagic Disk Speed Test

Maybe you are looking for

  • -Xmx Option (JDK 5.0 Windows AMD 64Bit)

    I wanna try to test JDK 5.0(Release Candidate) on Windows Server 2003 (CPU=AMD 64Bit)). Q1.Do I have to use "java -d64" option? Q2.How big can I set "java -Xmx" option? Thank you, kayafeg

  • OIM - Approval process available on updates/modifications of a resource ?

    Hello, I would like to implement a typical workflow : 1) UserA is able to provision a resource for other users. He provisions it for UserB. There's an approval process which says that it's UserB's manager (ManagerB) who will approve this request. Use

  • Classification migration with RCCLBI03

    Dear friends, I am trying to use the std. direct input program RCCLBI03 in order to migrate via LSMW the material assignments to classes and their characteristics. Till now I haven t managed to upload any file successfully! I imagine that it has some

  • Burnins a CD on a MAC

    I have been trying to Burn a CD with my Itunes but it keeps coming up with an error message saying ..." The attempt to burn a disc failed. The Device failed to respond properly, unable to recover retry." What can i do to fix this problem?

  • Me han instalado fibra optica por movistar, tengo linea wifi pero no puedo navegar gracias

    Hola me han istalado fibra optica de movistar en casa, no puedo navegar por internet, pero tengo señal de wifi. Llame a Telefonica y me dijero que siguiera un tutorial de ellos para configurar una parte que es lo del IPV6 y que pusiera la opcion solo