Which method is better to the performance?

Using SQLs at front side or using stored procedures at back side, which method is better to the performance?

jetq wrote:
In my view, it maybe have other difference, for example,
Using stored procedure, you don't need to recompile the script every time to be executed,
and use the existing execute plan.what if first time procedure is called after DB start?
PL/SQL does not have EXPLAIN PLAN; only SQL does.
But using SQL statement from application layer may be different.different than what exactly.
SQL is SQL & can only be executed by SQL Engine inside the DB.
SQL statement does not know or care about how it got to the DB.
DB does not know or care from where SQL originated.

Similar Messages

  • By which method,i can get  the no of rows in the record set?

    Does anyone help me that by which method,i can get the no of rows in the record set?
    now i use next() to check whether the next record is available or not?

    shashi_rajak wrote:
    under Practice Exercise #1 heading :
    there is a statement.
    "Now, the COUNT function does not need to retrieve all of the fields from the table (ie: employee_number, employee_name, and salary), but rather whenever the condition is met, it will retrieve the numeric value of 1. Thus, increasing the performance of the SQL statement."And have you ever tried it? Or do you simply blindly believe everything you read? And what sort of "authority" is "tech on the net"?
    P.S. A quick test on Oracle (and you must do each query at least twice throwing away the first result, as Oracle always caches things which will have an effect, and averaging the remaining attempts).
    count(*) -- 1 min 17 secs for 35,311,978 rows
    count(1) -- 1 min 19 secs for 35,311,978 rows
    Edit: And the table has 46 columns.

  • Which system is better making the TDC among DEV and PRD

    HI,
    which system is better making the TDC among DEV and PRD what are the advantages and disadvantages
    thanks in advance
    subbu

    hi arif
    TDC means Transport Domain Controller
    it is the system which contains common transport directory and which administer the all the systems taking part in TMS.
    if any other informaion regarding this welcome.
    SUBBU
    Message was edited by:
            subbu chennuru

  • Which method specify size of the director?

    I want to specify size of the director. which method need to use?

    length() !
    As far as I know, you will need to recurse the directory yourself and add up the sizes! Do this with great care! You'll need to be sure that each File is a file and not a directory; you'll have to decide how to handle nested directories -- recurse on those as well or do something else -- and you'll also have to be aware of symbolic liks which may return the length of the liked file and throw off your math!
    Sounds tedious. I looked through the API and I don't see anything there that does this for you.

  • Which method is better

    hi,
    when uploading data into sap,which method is to be used,either session method r call transaction method? how i can analyse which method is useful? explain briefly abt analying data?

    Hi,
    Better to use session method than other methods

  • Which method is better, the SELECT .. CURSOR(.. , or the Queries in loop

    I have a table t1, this table has 1 to many relation with
    tables t2,t3. t2,t3 do not have any direct relation with eachother.
    I have to read all data in all tables, what do you prefer
    from the following. I am using 10g release 2 but if there
    is some better way in 11g I can go for it also.
    Also generalize this for t2,t3,t4,t5,... etc.
    Method 1.
    FOR i in (SELECT * FROM T1) LOOP
    FOR j in (SELECT * FROM t2 WHERE t2.x=t1.x)LOOP
    ...process data...
    END LOOP
    FOR k in (SELECT * FROM t3 WHERE t3.x=t1.x)LOOP
    ...process data...
    END LOOP
    END LOOP;
    Method 2
    FOR i in
    (SELECT t1.*,
    CURSOR(select * from t2 where t2.x=t1.x),
    CURSOR(select * from t3 where t3.x=t1.x)
    FROM t1) LOOP
    ... process data...
    END LOOP
    Which one will be the faster and why.
    Thanks

    Your question is meaningless.
    Why? Because...
    > There is no way to join all these 3 tables correctly, because joining will
    produce reduandant rows.
    and...
    > its impossible to join all three tables here
    and then you show Method 1 and 2 as options.
    Guess what.
    You have coded a nested loop join in both!
    So just what makes your hack of a join in PL/SQL so much superior than an "impossible" nested loop join in SQL?
    Your problem is not joining.. it is conceptual and design fundamentals. Your approach says that the problem should be approached by discarding the fundamental concept of joining data in a RDBMS.. and thinking of row-by-row slow-by-slow serialised processing.
    Join. Use parallel processing. Either PQ or self-rolled via PL/SQL. There are loads of tools in the Oracle toolbox to address this type of problem.
    Message was edited by:
    Billy Verreynne

  • Samsung SCH-u370 vs. Kin TWOm ; Which would be better for the texter?

    So my plan is going to end in about two months so I decided to research some new feature phones online.
    Since I text often, I wanted a phone with a full keyboard, having a touch screen would be nice as well.
    The Samsung SCH-u370 isn't offered on at VZW anymore, but Bestbuy online still has a stock of it.
    The Kin TWOm looks like a very good phone (8MP camera, slide-out keyboard, etc.) but it didn't have good reviews for some reason.
    I mainly use my phone for texting, but will call for roughly 1-2 hours every other night during the week.
    Shelling out 50$ isn't a big deal for me, but free is always better.
    For the users that have experience with either phone or even both, which would you reccomend and why?
    P.S.
    - If they're any other keyboard feature phones coming out in the next two months, I would love to take them into consideration.
    Thank you so much!

    I have both.
    The u370 UI is much more polished, font sizes are great, you can adjust them. You can doodle/notate on pics. It's 3" resistive touchscreen. You can use finger nail or some dull pointer if touch is slightly off. I have not tested the e-mail/web browser as the phone doesn't have wi-fi and i don't have data plan. Music player is very basic, haven't tested video. No microSD card is included. The camera is 3MP, no flash, but there is night mode (more sensitive to light, but noisy images). You can doodle/notate over pics, great for making quick notes/directions. Because it relies on microSD for storage, you don't really need to use it with any specific software.
    Twom, some parts of the UI can frustrate some people. Font sizes are not adjustable, and there are many areas where the font is thin and small. The built in email client is text only, and it displays some html code rather than stripping them clean. But it does work over both 3g or wifi. The e-mail client's UI is simple, nice to use. You can do full webmail through the browser. You can type notes/comments on pics taken, no sketch pad. 3.4" capacitive touchscreen. That means you can't use fingernail or pointers. There is a Zune player with tegra1 hardware, which means audio and HD video playback. 8GB overall storage with about 6+ GB usable for storage. And you have to use the Zune desktop software to get data on/off the phone. 8MP camera with auto focus, image stabilization, and led flash. But no extras like b&w/sepia modes, etc, etc. The browser is good for mobile sites and small websites, but large websites takes a while to load. Overall it works well enough for basic html & css over wi-fi. Also keep in mind it's unlikely to get an update.
    I can't comment on texting as i don't have a text plan. The Twom keyboard is very tactile, you can hear it click, not mushy. If you really need a good browser on your phone, then you will need a smartphone. Between these two though, the Twom have the advantage in media, the u370 have the advantage as the easier to use phone. And it depends on how much you like/dislike the UI of either phone. The u370 have the more 'normal' UI. Whereas the Twom is more experimental looking, but cuts down the fluff.
    With either phone, make sure you disable 3g data.
    *Actually both keyboards are very good. The difference is the Twom have clicky plastic keys, and u370 have the noiseless rubbery keys. Both keyboards are top of their class. Each key is firm and it's not easy to accidentally click an adjacent key. Depends on which you prefer.

  • HT1178 I just bought an Airport Time Capsule. I already have a AirportExtreme for my wireless network for my home. Which would be better; connect the time capsule up to the extreme or use it as the primary base station?

    Is it better to connect my Time Capsule up to my existing wireless network or use the Airport Time Capsule as the base unit and start over again by creating a new network?

    There is no end of answers to this..
    But if you want AC wireless.. assuming you bought a new TC.. and the Extreme is the older N model.. then simply make sure the TC is as close as possible to where wireless AC client will be used.. and connect it back to the main router whichever that is, by ethernet.
    If both are AC then it will make no difference.
    As long as you can connect them both by ethernet and not use wireless extend.. it won't make much difference.
    The worst case is where you use wireless extend and expect high speed but totally lose it because of your bridge link.. if that is the case you wasted your money and you can return the TC and buy a hard disk and plug it into the AE.

  • Which one is better for playback/performance - iMac or Mac Pro?

    I'm getting a new mac and I don't care that much about the render time as I do about being able to play back my effects in real time. I know that both the $1500 iMac and the Mac Pro would work with Premiere and I'm pretty sure I won't have any problems with the Mac Pro but obviously I'm on a budget so my question is - will the iMac be able to handle effects in real time without the need for me to render first?

    It makes no difference whatsoever.

  • IPad or Mac? which is better worth the money?

    iPad or Mac? which one is better worth the money, if mac, which is the cheapest but still gives you all the good apps and qualities? I would use it alot, and i already have an iouch so would the ipad be worth it? im a teenager so i would use these things alot,and i need some features to help with school and just having fun!!

    iPad is not a substitute for a Mac. It's more like a companion to a Mac.
    In desktops, Mac mini should be sufficient and is the only comparable Mac in terms of price, but you need to add a monitor, keyboard.
    In laptops, consider the MacBook Air for its portability, and the MacBook Pro for more options in terms of processing and screen size.
    Visit an Apple Store (the physical kind). The staff is very helpful and will assist ou in making a decision.
    Message was edited by: Rysz

  • Which Laptop is better? HP DV7-4177NR OR DV7-6B55DX​?

    Okay I need to buy a new laptop ASAP! Can you guys help me and tell me which one is better?
    Both laptops are refurbished.
    DV7 4177NR :http://www.ebay.com/itm/HP-PAVILION-DV7-4177NR-AMD​-PHENOM-II-DUAL-CORE-N640-2-9GHZ-/170872977978?pt=​...
    DV7-6B55DX :http://www.cowboom.com/product/1033798
    Okay well both laptops seem good to me but which one is better?
    The 4177NR features a AMD Phenom II Dual Core N640 @2.9GHZ
    6GB DDR3 RAM
    640GB HD
    BluRay 
    17.3 INCH Screen
    Graphic :ATI Mobility Radeon HD 5470
    Sound :Beats Audio and HP Triple Bass Reflex Subwoofer
    The 6B55DX offers 
    2nd gen intel core i5 -2430 M processor 2.40GHZ with turbo boost to 3 GHZ
    8GB Ram
    Intel HD graphics 3000
    Beats Audio
    etc.
    So which one is better for games? Which one has less problems and wont cause me to spend lots of money to fix in the future?
    I can get the 4177nr for 475 with 10 bucks cash back
    and i can get the other one for around 520. 

    The Intel laptops is probably a better choice. That Radeon HD 5470 is not much powerful and the integrated Intel chip will be better as it uses the advantage of the Sandy Bridge Core i5 processor. However, there are better machines for games than these ones..
    Dv6-7000 /Full HD/Core i5-3360M/GF 650M/Corsair 8GB/Intel 7260AC/Samsung Pro 256GB
    Testing - HP 15-p000
    HP Touchpad provided by HP
    Currently on Debian Wheeze
    *Please, help other users with the same issue by marking your solved topics as "Accept as Solution"*

  • Which way is better to reverse a key figure sign, update rule or KF prop.?

    We are trying to reverse a key figure sign and have got two options:
    1. In Update Rule by using formula to make this key figure * 1-, or
    2. In key figure property of query design mode, there is a checkbox of "Reverse +/- Signs".
    Which one is better for the above two options?
    Thanks
    Message was edited by: Kevin Smith

    Hi,
    1. In Update Rule by using formula to make this key figure * 1-, or
    A: If you want to update data permanently in Data Targets then go for update rules.
    2. In key figure property of query design mode, there is a checkbox of "Reverse +/- Signs".
    A: The data is not updated in Data Targets but while displaying in Reports it will display the sign.
    That is upto you and business requirements.
    Thanks
    REddy

  • Which method is right  for creating directory

    Hi all
    whenever we create directory for oracle 11g during installtion
    we have two method from documents
    which method is right
    Create the directories in which the Oracle software will be installed:
    mkdir -p /u01/app/oracle/product/11.1.0/db_1
    chown -R oracle:oinstall /u01
    chmod -R 775 /u01
    or
    Create the directories in which the Oracle software will be installed:
    mkdir -p /u01/app/oracle
    chown -R oracle:oinstall /u01
    chmod -R 775 /u01

    ORACLE_BASE is a base directory which is owned by oracle user. The software itself is installed in ORACLE_HOME. When you create ORACLE_HOME it creates you also ORACLE_BASE. That's the way to go. If you don't have ORACLE_HOME created Oracle Universal Installer might complain or fail.

  • Which is best method to improve the performance

    Hi,
    I have one scnerio, to meet this requirement i have two methods
    My requirement is to get the data from multiple tables, so i am developing a query based on joins and this query may give approx 80000 rows.
    To meet this requirement i have two methods.
    I have confusion which is the best method to improve the performance.
    Method #1
    for i in <query>
    loop
    end loop;
    Here we are retriving row by row(80000 rows) from data base and applying our logic
    Method #2
    By using the BULKCOLLECT at a time we are getting all the rows(80000 rows) into plsql table.
    then loop is based on plsql table
    for i in 1..plsqltable.count
    loop
    end loop;
    Here we are retriving row by row(80000 rows) from plsql table instead of going to data base.
    Can any body please suggest which is the best to improve the performance

    Using BULK COLLECT will give you better performance with a large data set because there will be reduced IO with this method versus the traditional CURSOR FOR LOOP. Database Admin's (DBAs) typically don't like BULK COLLECT because developers tend to forget to limit the number of rows returned by the BULK COLLECT operation so it could use up too much memory. Take a look at DEVELOPER: PL/SQL Practices On BULK COLLECT By Steven Feuerstein for some great tips on using BULK COLLECT. Another good Feuerstein article is: Bulk Processing with BULK COLLECT and FORALL.
    As others have mentioned, you should have posted your question in the PL/SQL forum. ;)
    Hope this helps,
    Craig...

  • Which of these cables is better for the current Macbooks?

    I have a 2008 Macbook, with the mini displayport that can't output audio. I decided to rectify this by buying this cable, which combines video from mini displayport and audio from USB into an HDMI cable:
    http://www.kanexlive.com/products/iAdapt20.html
    now, I might be getting one of the new Macbook Pros that will be coming out in the next month or so, or one of the current models if the new ones take too long. so i'm wondering if I should replace the cable I have with one of these:
    http://www.kanexlive.com/products/mdphdmi10ft.html
    or
    http://www.kanexlive.com/products/iAdaptV2.html
    should I go ahead and get the upgrade? I figure it would be an improvement since those give better quality audio. I'm also wondering how my current cable would perform when plugged into a MDP that send audio on its own. could that cause a problem, since I would be out putting audio through 2 ports into the same cable? also, I wonder if the newer cables might have any problems due to getting power from the MDP instead of USB, I don't know whether that makes a difference or not.

    It doesn't matter which one you get since the Atom CPU has a 667MHz FSB.
    If you install 800MHz RAM, it will simply run at 667MHz.

Maybe you are looking for

  • Adobe Community Help Application Updates - Stuck in download process

    I read in the forums where people have had problems with the initialization of the download freezing, but my problem is that when I download the local updates... The download itself freezes. When I try to update everything at once, it hangs up every

  • Report with the command button

    Hi folks, i had got a set of selection screen in my report to populate the data to a Transparent Table, before saving the record we need to display the exact record to the user for conformation. how we archive this one with the normal report. Reg, Ha

  • How to fix a Domain file that will not open

    We have a Domain file on our Mac Mini that will not open - iWeb keeps saying that it cannot be found, even though it is in the Library/Application Support/iWeb folder. I transferred the Domain file to my GS, and I get the same response - if I switch

  • HT5163 Does the iphone 4 (Verizon) have a way to remove sim?

    I was giving my old phone to a friend.  I reset it but was going to remove my sim when I discovered it did not have a sime slot like my old ATT iphone.  Are they built into the Verizon phone?

  • No signal in the screen

    Hi, i need help yesterday my lap was working good, but after lunch i try turn on, and i cant see nothing on my screen is dark just the ligth of the button of power my model is a toshiba U405-S2824, please help me! i  opened my computer and everything