Saving Query as application variable (performanceQuestion)

Ask a Question related to Coldfusion Database Access, Design and Development.

  1. #1

    Default Saving Query as application variable (performanceQuestion)

    Is there a limit to the size of query you can or should save as an application
    varialble, I have a real estate app with about 6,000 listings and was wondering
    if I should call the database each time there is a search or save a query as an
    application variable and search the query upon request. Any advice would be
    much Appreciated.

    Thank You

    Johnny Derk Guest

  2. Similar Questions and Discussions

    1. PARSING A QUERY OF QUERY WITH A VARIABLE VALUE
      On my first page the user selects a project. I am using the variable SelectedProject: <cfset SelectedProject =...
    2. Problem in saving value of a textbox into a variable
      I have a problem in saving value of textbox1 and RadioButtonList1 into a variable so that i can insert a rec in the table.....following is the HTML...
    3. Query error saving to Memo field ...
      <cfqueryparam cfsqltype="CF_SQL_LONGVARCHAR" value="#arguments.details.CONTENT#"> let me save properly to Memo field unless "CONTENT" length is more...
    4. Unusual Application Error when saving
      Often when i try and save a document in Illustrator 10, i get a message saying 'can't save Illustration' and sometimes 'not enough memory' even...
    5. Cant set CCW in ASP Application variable
      I have a managed object that I want to use from an existing ASP (classic, not .net) application. The object contains a cache and may be accessed...
  3. #2

    Default Re: Saving Query as application variable (performanceQuestion)

    Better approaches would be to either cache the query or save as a session
    variable. However, you are now dealing with snapshots, rather than real time
    data.

    Just out of curiousity, under what circumstances would you select all 6000
    listings?

    Dan Bracuk Guest

  4. #3

    Default Re: Saving Query as application variable (performanceQuestion)

    My plan was to have a scheduled upload of a csv file into the database nightly
    and upon completion run the query and set the variable.

    I don't need real time data because I only get the feed nightly so as long as
    I can recache upon upload completion on a nightly basis, I would have the most
    upto date data possible.

    I think Caching the query sounds like the answer, do still agree after my
    reply.

    Thanks for you help

    Johnny Derk Guest

  5. #4

    Default Re: Saving Query as application variable (performanceQuestion)

    Dan,

    Is your question referring to when a user would ask to see all listings.
    If so the only time I would need that is if somebody either went to the
    results page without entering search criteria (by default all listings show).

    I also wanted to have all listings available so when there was a search done I
    could search the saved query and take the load off of my DB. I was under the
    impression that this would improve the performance of the site.

    Thank You For You Help

    Johnny Derk Guest

  6. #5

    Default Re: Saving Query as application variable (performanceQuestion)

    Searching the saved query is a good idea. Especially if someone really wants to see all 6000. You'll want to display them over more than one page or you may overwhelm the user's browser.
    Dan Bracuk Guest

  7. #6

    Default Re: Saving Query as application variable (performanceQuestion)

    Thank You Dan,

    I am planning on using recordset navigation with 10 results displayed per page. I will plan on saving the query.

    Thanks again
    Johnny Derk Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139