fetch limit

From: tnaki..ofthome.net
Date: Thu Apr 07 2005 - 09:48:53 EDT

  • Next message: Andrus Adamchik: "Re: fetch limit"

    Hi everyone,

    I was wondering...wouldn't a logical addition to Query.setFetchLimit and
    Query.setPageSize be something Query.setExecLimit?
    By execLimit, I mean limiting queries with "...LIMIT n" for Postgre,
    "...TOP n..." for MSSQL or whatever works for other RDBMS.
    I came across the issue while querying a table and getting 120k+ records
    (I need just one, really): this takes about 4 seconds no matter what I
    do with fetchLimit and pageSize. I also tried an iterated query, but saw
    no significant improvements (why is that?). Anyway, for my needs, it's
    easy enough to make a view (or a procedure) that does the trick, but I
    tend to pull whatever I can into the "middle" layer so that I don't have
    a lot of work if I want to switch databases and that's why I want to
    hear other opinions about this.

    Thanks,
    Tomislav



    This archive was generated by hypermail 2.0.0 : Thu Apr 07 2005 - 09:45:03 EDT