Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Sep 2012
    Posts
    76
    Thanks
    61
    Thanked 0 Times in 0 Posts

    Stored functions

    Hello, of late I've been learning about stored functions. Just have one question on them please. When and how do you decide if a query is a possible candidate to become a stored function? Is it when you have a fairly large query, or when you are performing a lot of multiple operations within a query - or even something else?

    Thank you

  • #2
    Senior Coder
    Join Date
    Dec 2005
    Location
    Slovenia
    Posts
    1,958
    Thanks
    120
    Thanked 76 Times in 76 Posts
    None of those.

    1.When you need to do more queryies at once
    2. when you dont need a resultset (if you do ,use stored procedure)
    3. when you reached limit of relational db querying --> you need to parse resultset
    4. when you decide to be better to have most of things done on db side, not on client side.
    Found a flower or bug and don't know what it is ?
    agrozoo.net galery
    if you don't spot search button at once, there is search form:
    agrozoo.net galery search

  • #3
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,020
    Thanks
    75
    Thanked 4,323 Times in 4,289 Posts
    I think perhaps Oatley is confused about the difference between stored functions and stored procedures.

    Oatley: Bubikol was answering *specifically* about stored functions. Most people will find more uses for stored procedures than for stored functions.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •