Flipkart.com

Monday, August 1, 2011

Huge SELECTs reuslting in Time out: What is the solution?

 I have an SQL statement which is timing out. It uses primary key and all usual options of tuning have been tried. What do you suggest?


Cursors with “Package SIZE” are useful to avoid time-out issues while fetching huge number of records.

A SELECT statement transfers entire result set into the application server. Where as when CURSOR is used with PACKAGE SIZE, only the number of rows mentioned in PACKAGE statement is copied in one go.

For example if your result set has 5 million records, using a SELECT statement would time-out. This is because in one database fetch, all 5 million records would be tried to transfer into the application server, thus timing out.

But if I use a CURSOR with 10,000 as package size, there would be 500 database fetches, but there would not be any time-out since only 10,000 records will be fetched in one go.

But, yes, there is a sacrifice we have done due to 499 extra fetches. What if we use a package size of 1 million?

39 comments:

  1. I've been exploring for a bit for any high-quality articles or blog posts on this sort of house . Exploring in Yahoo I ultimately stumbled upon this site. Reading this info So i'm happy to exhibit that I have an incredibly just right uncanny feeling I came upon exactly what I needed.
    I such a lot without a doubt will make certain to do not forget this website and provides it a glance on a relentless basis.



    Feel free to visit my web site ... shoe online shop

    ReplyDelete
  2. Please let me know if you're looking for a article author for your weblog. You have some really great posts and I think I would be a good asset. If you ever want to take some of the load off, I'd really like to write some content for your blog
    in exchange for a link back to mine. Please blast me an
    e-mail if interested. Thanks!

    Here is my web page :: pkv forum

    ReplyDelete
  3. Hey just wanted to give you a brief heads up and let you know a few of the images aren't loading properly. I'm not sure why but I think its a linking issue.
    I've tried it in two different browsers and both show the same results.

    Also visit my homepage; online shop marken

    ReplyDelete
  4. This design is spectacular! You definitely know how to keep a reader amused.
    Between your wit and your videos, I was almost moved to start my own blog (well,
    almost...HaHa!) Fantastic job. I really enjoyed what you had to say, and more than that, how you presented it.
    Too cool!

    Here is my webpage kredit mit negativer schufa
    My page :: kredit ohne schufa hartz 4

    ReplyDelete
  5. Every weekend i used to pay a quick visit this web site, as i wish for enjoyment, since
    this this web page conations in fact fastidious funny stuff too.


    Have a look at my page: work from home job possibilities
    my site: legitimate jobs from home

    ReplyDelete
  6. I enjoy what you guys tend to be up too. This type of clever work and exposure!
    Keep up the wonderful works guys I've added you guys to my blogroll.

    my page vergleich krankenkassen

    ReplyDelete
  7. Every weekend i used to visit this web site, for the reason that i want enjoyment, as this this website conations genuinely good funny stuff too.


    Here is my web page :: barbados all inclusive

    ReplyDelete
  8. Because the admin of this web site is working, no question very rapidly it will be famous, due to its
    feature contents.

    My web blog; consolidate your loan
    my website - private educational loan consolidation

    ReplyDelete
  9. Hey there are using Wordpress for your blog platform?
    I'm new to the blog world but I'm trying to get started and
    set up my own. Do you need any coding knowledge to make your own blog?
    Any help would be greatly appreciated!

    Feel free to visit my web blog how to refinance a car loan with bad credit

    ReplyDelete
  10. Hey just wanted to give you a quick heads up. The text in your post seem to be running off the screen in Safari.
    I'm not sure if this is a format issue or something to do with web browser compatibility but I thought I'd post to let you
    know. The design and style look great though! Hope you get the
    problem solved soon. Many thanks

    Also visit my web page :: web hosting service
    Also see my webpage: best web hosts

    ReplyDelete
  11. Woah! I'm really enjoying the template/theme of this website. It's simple, yet effective.
    A lot of times it's very hard to get that "perfect balance" between user friendliness and visual appeal. I must say you have done a fantastic job with this. In addition, the blog loads super fast for me on Safari. Superb Blog!

    my homepage self help affiliate programs

    ReplyDelete
  12. I'm really impressed with your writing skills as well as with the layout on your blog. Is this a paid theme or did you customize it yourself? Anyway keep up the nice quality writing, it is rare to see a great blog like this one today.

    Here is my web-site; krankenversicherung tiere vergleich
    My web page > http://Telmexhub.mx/?q=node/48175/

    ReplyDelete
  13. Saved as a favorite, I love your web site!

    Also visit my homepage ... private krankenversicherung hamburg

    ReplyDelete
  14. I'm not sure where you are getting your information, but good topic. I needs to spend some time learning more or understanding more. Thanks for excellent info I was looking for this info for my mission.

    Here is my web blog: online shoppen
    Also see my page > damenschuhe billig kaufen

    ReplyDelete
  15. Hey There. I found your weblog the usage of msn. This is
    an extremely smartly written article. I will make sure to bookmark it and return
    to read more of your helpful info. Thanks for the post.
    I will definitely comeback.

    my blog; gesetzliche versicherung vergleich

    ReplyDelete
  16. Hi! This post couldn't be written any better! Reading through this post reminds me of my good old room mate! He always kept talking about this. I will forward this write-up to him. Fairly certain he will have a good read. Thank you for sharing!

    Feel free to surf to my site kleidung günstig online

    ReplyDelete
  17. You really make it seem really easy with your presentation however I find this topic to be
    actually something which I feel I would never understand.
    It sort of feels too complicated and extremely large for
    me. I am looking ahead in your subsequent post, I'll attempt to get the hold of it!

    Feel free to surf to my webpage - home equity loans calculator
    Also see my page: student loans with bad credit

    ReplyDelete
  18. Your style is really unique in comparison to other people I've read stuff from. Thanks for posting when you have the opportunity, Guess I will just bookmark this page.

    my blog honeymoon all inclusive
    Also see my webpage - caribbean all inclusive honeymoons

    ReplyDelete
  19. Way cool! Some extremely valid points! I appreciate you penning this article plus the rest of the site is very good.


    Here is my site how to consolidate student loans

    ReplyDelete
  20. Hurrah, that's what I was exploring for, what a data! existing here at this weblog, thanks admin of this web site.

    Also visit my web blog - free reseller hosting
    My web page: top rated web hosting services

    ReplyDelete
  21. Fantastic goods from you, man. I have keep in mind your stuff prior
    to and you're simply extremely excellent. I really like what you've received right here, certainly
    like what you are stating and the best way
    wherein you assert it. You are making it entertaining and you continue to care for to stay it smart.

    I can not wait to learn much more from you.
    That is actually a terrific web site.

    my website :: bankkonto trotz negativer schufa

    ReplyDelete
  22. Greetings! This is my first comment here so I just wanted to give
    a quick shout out and say I really enjoy reading through your posts.

    Can you recommend any other blogs/websites/forums
    that cover the same subjects? Thank you so much!

    Check out my web site affordable seo company

    ReplyDelete
  23. My family always say that I am wasting my time here at web, however I know I am getting
    familiarity all the time by reading such good posts.


    my page ... Business ideas uk

    ReplyDelete
  24. Usually I don't learn article on blogs, however I wish to say that this write-up very forced me to try and do so! Your writing style has been surprised me. Thank you, very great post.

    Also visit my blog bad credit home lenders

    ReplyDelete
  25. I will right away snatch your rss feed as I can not in finding your email subscription hyperlink or
    newsletter service. Do you've any? Kindly permit me realize so that I may subscribe. Thanks.

    my site; visit the following site

    ReplyDelete
  26. Howdy! Someone in my Myspace group shared this site with us
    so I came to take a look. I'm definitely enjoying the information. I'm book-marking and will be tweeting this to my followers!
    Superb blog and superb design and style.

    my blog post: Suggested Internet site

    ReplyDelete
  27. Thanks for sharing this information.It was very nice blog to learn it here

    ReplyDelete
  28. SAP HR Training in Chennai
    We provide SAP HR training in Chennai with real time Scenarios. We are the best training institute in Chennai providing real time training. The people who have knowledge in HR, then they can easily learn SAP SF and HR modules.
    Contact us: 9003085882/8122241286
    SAP HR Training in chennai

    ReplyDelete
  29. my friend Suggest me this blog and I can say this is the best blog to get the basic knowledge.Thank you so much for thissap hr abap online classes

    ReplyDelete