4 Replies Latest reply on May 21, 2009 4:46 AM by Dan Bracuk

    how to use cfquery result in other page?

    haire

      hi,

       

      i have a big big query in pageA.cfm ,for example

       

      <cfquery name="rsGetStudent" datasource="#str_conn#" cachedwithin="#CreateTimeSpan(0, 0, 30, 0)#" >

           select * from student_all

           where 1=1

           #SQLFilteringDependOnUser#

      </cfquery>

      this query will return about 100,000 row.
      i want to take the result in query "rsGetStudent" to page B. how do i do that?
      using session?
      using URL parameter?
      any suggestion?
      thank you....

        • 1. Re: how to use cfquery result in other page?
          mack_ Level 3

          If the results are specific to a user then use the Session scope. If

          all the users share the results then use the Application scope.

           

          Mack

          • 2. Re: how to use cfquery result in other page?
            haire Level 1

            thanks for the suggestion Mark...

             

            i just want to know if there is a performance issue when using Session  or Application to hold a 100,000 row of data accros the application?

             

            do i need a bigger RAM ?

            does my application will be slow in performance?

             

            currently i don't use Session or Application variable to hold big big data... just the user login information only.

             

            thank for any suggestion...

            • 3. Re: how to use cfquery result in other page?
              mack_ Level 3

              Holding 100,000 rows of data will surely influence some aspects of

              your server performace. How much it affects the server depends

              primarily on the type and amount of data that is in the rows: numeric

              types take less memory space then string types, more columns also mean

              more memory space, etc. The obvious optimization here is to find a way

              not to retrieve and store that amount of data in the first place: you

              can use the database to retrieve only the rows that you need to be

              displayed at one time.

               

              You can check how big is the impact by using the Server Monitor to

              monitor the memory consumption.

               

              Mack

              1 person found this helpful
              • 4. Re: how to use cfquery result in other page?
                Dan Bracuk Level 5

                Run it again.  You have it cached.