2 Replies Latest reply on Aug 18, 2006 2:06 PM by danimx

    jdbc + cfoutput + group

    danimx
      I found that cfoutput supports a java.sql.ResultSet object for its query attribute. It is not documented here, but it is a very useful feature as it can help streaming very long queries to the output stream.
      However, I'd like to know how will it behave when combined with the group attribute, as I am having some memory problems related with that, specifically if cfoutput will populate a Query object from the jdbc ResultSet or will use it plain when combined with the group attribute.
      Has anyone else tried jdbc ResultSet with cfoutput, either using the group attribute or not ?
      Thanks in advance.
        • 1. Re: jdbc + cfoutput + group
          <newbie />

          Your findings that using java.sql.ResultSet in the query attribute is very interesting.

          Did you happen to find out at what point (query size) would it be most
          beneficial to use java.sql.ResultSet. I was wondering if with smaller
          or average size resultsets the benefits would be imperceptible.

          Also, with very large queries, did you see improvements in the orders of magnitude.

          Finally, what kinds of issues did you encounter that led to you look into
          using java.sql.ResultSet. I'm wondering if I should be on the lookout or
          something similar.

          Sorry about not having any ideas for your original post. I don't thing I'm qualified
          to suggest anything about the topic.

          Good luck!
          • 2. Re: jdbc + cfoutput + group
            danimx Level 1
            I had memory problems because cfquery takes the entire resultset into memory, and this can be a problem when preparing listings of 100,000+ rows. That is what i started using jdbc, and it happened to work with cfoutput. Alas, if you dont close the jdbc connection it will be opened until restart, so remember to include a try/catch when using this.
            The difference is not only by the shorter response time when using large resultsets. A huge resultset will cause a java.lang.OutOfMemory exception and sometimes a server crash, when loaded at once in memory.