Results 1 to 3 of 3

Thread: Sybase: Limit return not use rowcount ?

  1. #1

    Thread Starter
    Fanatic Member kevin_sauerwald's Avatar
    Join Date
    Feb 2002
    Location
    outside Philly
    Posts
    516

    Sybase: Limit return not use rowcount ?

    is there a way to make sybase limit what it looks for ? I know rowcount will
    make it only return so many rows.. but that wont make it stop searching the
    whole DB before it does it..

    I have people running wide open queries that kill the system and they
    will keep on doing it once and a while.. impossible to stop.. I wish I could..

    so I tried rowcount, but thats no good.. it only limits what it spits out now how many it searches.. so is there a way to say after you found x rows, just stop ? or only look through 500k entries and return.. anything to make it
    stop finding way more than it can handle before it tries to rowcount chop it ?

    anyone ?

  2. #2
    New Member
    Join Date
    Oct 2008
    Posts
    3

    Re: Sybase: Limit return not use rowcount ?

    In sybase there is a statement you issue before launching your query.
    This statement tells the max number of rows to spit out.

    Use
    Code:
    SET ROWCOUNT 10
    To only see the first ten rows

    But I am not sure if it cures your problem.

  3. #3

    Thread Starter
    Fanatic Member kevin_sauerwald's Avatar
    Join Date
    Feb 2002
    Location
    outside Philly
    Posts
    516

    Re: Sybase: Limit return not use rowcount ?

    nope.. rowcount tells it to only split out x amount of rows.. it will still find
    50k and only then return 10 or whatever. I need to stop it from finding way
    way way too many.. by then its too late and the system is hung..

    I kinda want it to say hey once you find the first 300.. just stop looking.

Posting Permissions

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



Click Here to Expand Forum to Full Width