Skip to main content
September 18, 2008
Question

Outputting large resultsets.

  • September 18, 2008
  • 7 replies
  • 722 views
Hi,

I have a resultset containing almost 25,000 records which I need to output in a single page, I am <cfflush> to for displaying it instantly.

But I experience a hang kind of a thing while trying to accomplish that..

Are there any other ways to accomplish this?... (the same of <cfflush>)...
    This topic has been closed for replies.

    7 replies

    tclaremont
    Inspiring
    September 22, 2008
    In my mind, it goes bad as soon as you decide you want to output 25k records on a single page...

    What database are you using? Is the query a stored procedure in the database, or are you using CFQUERY to fetch this bohemeth of a data set? How many fields are to be returned? How large is the original database? What is going to happen when a bunch of users try to run the same query at the same time? Is this an intranet where you have some control over the servers, or are you doing this on a shared host?
    Inspiring
    September 19, 2008
    If you do this:

    text
    flush
    query
    text
    flush
    cfoutput query
    #data#
    flush
    close cfoutput tag
    at what point does it go bad?
    Inspiring
    September 19, 2008
    It'd really be a lot easier answering your question if we we could see
    code.

    --
    Adam
    Inspiring
    September 19, 2008
    cfflush is suppose to handle this(depends on the interval parameter value you set), but take note that cfflush is only for displaying when a certain number of bytes has been returned from the query. Meaning, if there is slowness in your query, the DB part, cfflush can do nothing about it. Maybe you should also check your SQL, or maybe your db and try to find ways for your db to perform faster. Your server could have some issues also, the memory, etc. You need to check on these things. And by the way, did you put an interval parameter to your <cfflush>? How much?
    September 19, 2008
    Hi,

    I knew there should paging/sorting/filtering sort of things. But it is an requirement, and I have to accomplish this.

    Normally while using the <cfflush> I never faced this type of a hang. Any other suggestions?..
    BKBK
    Community Expert
    Community Expert
    September 19, 2008
    Why don't you display it without using cfflush?

    "Just out of curiousity, what is the user supposed to do when he sees 25000 records on a web page?"
    Dan's question is worth a think.



    Inspiring
    September 19, 2008
    you need to do some filtering, either by relevance(this is done in your query) or by forcing the user to add some field filters. and why would you want to display such a large result in one page? if you really want to get all those results, do it per page. say, maybe you have 100 records per page, then give a link for next, previous, first and last buttons.
    Inspiring
    September 18, 2008
    There is a limit on the amount of data that can be presented on a web page. It's a function of how much RAM the machine has and the browser capability. If you try to send too much data, you'll freeze up the machine.

    I don't know how much data is too much for today's computers, but I know that when we were using Windows 95 and Netscape 4, it would start to get dicey after 500 records.

    Just out of curiousity, what is the user supposed to do when he sees 25000 records on a web page?