Doug, There are two interesting things here (at least for me...)
You wrote: >My suggestion: write a custom query on your record that returns a query >with all the data you need. I think reactor can do a lot with Gateways that is at present not Documented. I am trying to document some of them have started to do so on my Blog. If you want to use anything I wrote so far or will wite in the next couple of weeks as official documentation feel free to do that. http://blog.objectiveinternet.com/backpage/ >If you call getArray() *all* the >records in the iterator will be converted to records and you might as well >go take a nap. However, getArray(1,10) will convert the first 10 records to >Records and won't be as expensive. I often do a similar thing with very large record sets where I let the datbase give me the next 20 records each time. However this requires the SQL query to be able to somthing like: SELECT TOP 20 PrimaryKey, Field1, Field2, Field3 FROM Table WHERE PrimaryKey NOT IN (SELECT TOP n PrimaryKey FROM Table ORDER BY PrimaryKey ASC) ORDER BY PrimaryKey ASC This would retrurn 20 records starting with the (n+1)th record. As far as I can see There is no way to use a SELECT with an IN() in Reactor or am I missing it? Kevin Roche -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Doug Hughes Sent: 30 August 2006 17:54 To: [email protected] Subject: RE: [Reactor for CF] Iterator performance question Yea - that's beyond the capabilities of iterators. I wouldn't treat that many records as objects. 400 instantiations of anything is bad news. My suggestion: write a custom query on your record that returns a query with all the data you need. Either that, or you could use getAt() and only convert a small set of records in your iterator into objects. By default the iterator is backed by a query, so that should be fast enough. If you call getArray() *all* the records in the iterator will be converted to records and you might as well go take a nap. However, getArray(1,10) will convert the first 10 records to Records and won't be as expensive. Some method of using this might be a good option for you. Doug -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Aaron Lynch Sent: Wednesday, August 30, 2006 11:44 AM To: [email protected] Subject: [Reactor for CF] Iterator performance question I am encountering some slow processing/request time-outs when trying to do any instantiation of an object's children (400 ish child objects , each has additional child objects of their own) and I am hoping someone else out there has seen this too. Here is the scenario: Company object is instantiated in the session scope. A Company has Many Questions (via a linked relational table "CompanyQuestions") (There happen to be 448 Questions associated with this Company.) Each Question has a couple has One relationships of its own. When I do a getQuestionIterator().getArray() I get a request timeout (obviously, the same thing happens when I loop over the iterator to access each Question object)... note: I changed the request timeout to 180 seconds just to see if it could complete within that time-frame, it still timed out. When I do a getQuery() it runs fine and returns the record-set as it should. Reactor config is set to production mode... Database is MSSQL 2000... Any ideas on ways to improve this performance? I need to get to the Question's children as part of the process I am working on, and I would like to be able to utilize the Question iterator if possible. Thanks in advance, Aaron Lynch www.AaronJLynch.com -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Reactor for ColdFusion Mailing List [email protected] Archives at: http://www.mail-archive.com/reactor%40doughughes.net/ -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- - - -- Reactor for ColdFusion Mailing List [email protected] Archives at: http://www.mail-archive.com/reactor%40doughughes.net/ -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- - - -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Reactor for ColdFusion Mailing List [email protected] Archives at: http://www.mail-archive.com/reactor%40doughughes.net/ -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

