Return-Path: Delivered-To: apmail-db-torque-user-archive@www.apache.org Received: (qmail 63844 invoked from network); 27 Nov 2003 07:25:27 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 27 Nov 2003 07:25:27 -0000 Received: (qmail 22585 invoked by uid 500); 27 Nov 2003 07:25:01 -0000 Delivered-To: apmail-db-torque-user-archive@db.apache.org Received: (qmail 22573 invoked by uid 500); 27 Nov 2003 07:25:01 -0000 Mailing-List: contact torque-user-help@db.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Apache Torque Users List" Reply-To: "Apache Torque Users List" Delivered-To: mailing list torque-user@db.apache.org Received: (qmail 22557 invoked from network); 27 Nov 2003 07:25:01 -0000 Received: from unknown (HELO server1.SD04.JRD.jp) (212.100.255.57) by daedalus.apache.org with SMTP; 27 Nov 2003 07:25:01 -0000 Received: from RANAS8200 (solis.st.wakwak.ne.jp [218.225.209.215]) (authenticated) by server1.SD04.JRD.jp (8.11.6/8.11.6) with ESMTP id hAR7Pc503752 for ; Thu, 27 Nov 2003 16:25:39 +0900 From: "Amit Rana" To: "'Apache Torque Users List'" Subject: RE: Performance problems Date: Thu, 27 Nov 2003 16:25:04 +0900 Message-ID: <006701c3b4b7$95b38190$0e01a8c0@RANAS8200> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.2616 Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 In-Reply-To: <3FC59C01.9080605@joshholtzman.com> X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N > I'm wondering what's going on when I ask the JSP to > account.getAssignments(). Is the JSP hitting the database in order to > instantiate the account's assignments? Yes, I remember reading it somewhere in the docs. Your call for Assignments results in a DB query. Check the logs, it will tell you whats happening. HTH Amit. > -----Original Message----- > From: Josh Holtzman [mailto:josh@joshholtzman.com] > Sent: Thursday, November 27, 2003 3:39 PM > To: Apache Torque Users List > Subject: Performance problems > > I'm using torque in a webapp, and I'm seeing really slow performance > when I try to get data from "nested" objects. Here's what I mean: > > I have a torque object named Account. An account can have several > Assignments, which is another torque object. An assignment can have > Jobs (yup -- another torque object) and a Job can have a Category (yet > another torque object). Due to the amount of data stored in each of > these, they must be separate objects (I'm trying to avoid eliciting the > obvious solution "put all of that info in one object" suggestion). > > I grab a list of accounts in my servlet with a doSelect(criteria) and > send them to a JSP to be displayed (I'm using struts, but that's beside > the point). If I ask the JSP to just display info in the Account > object, everything runs quickly. If I ask the JSP to get the Account's > Assignments and display info from the Assignments, it slows down a bit. > Once I ask for Job or category info, it grinds to a crawl. > > I'm wondering what's going on when I ask the JSP to > account.getAssignments(). Is the JSP hitting the database in order to > instantiate the account's assignments? I would think that when I > instantiated the Account, all of its own internal objects (the > assignments, the jobs, the categories) would also be instantiated. So > why then the huge performance hit? > > I know that I am missing something here, so please, all of you Torque > gurus, let me know where young grasshopper has strayed from the path. > And if I need to provide more details (code, etc), I can do that too. > > Thanks so much, > Josh > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org > For additional commands, e-mail: torque-user-help@db.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org For additional commands, e-mail: torque-user-help@db.apache.org