Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 58176 invoked from network); 17 Mar 2006 17:32:29 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 17 Mar 2006 17:32:29 -0000 Received: (qmail 25335 invoked by uid 500); 17 Mar 2006 17:32:26 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 25279 invoked by uid 500); 17 Mar 2006 17:32:26 -0000 Mailing-List: contact user-java-help@ibatis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user-java@ibatis.apache.org Delivered-To: mailing list user-java@ibatis.apache.org Received: (qmail 25248 invoked by uid 99); 17 Mar 2006 17:32:26 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 Mar 2006 09:32:25 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [195.130.132.58] (HELO astra.telenet-ops.be) (195.130.132.58) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 Mar 2006 09:32:24 -0800 Received: from localhost (localhost.localdomain [127.0.0.1]) by astra.telenet-ops.be (Postfix) with SMTP id F1696D0079 for ; Fri, 17 Mar 2006 18:32:03 +0100 (CET) Received: from [213.118.81.209] (dD57651D1.access.telenet.be [213.118.81.209]) by astra.telenet-ops.be (Postfix) with ESMTP id C0298D0066 for ; Fri, 17 Mar 2006 18:32:03 +0100 (CET) Message-ID: <441AF262.3010001@pandora.be> Date: Fri, 17 Mar 2006 18:31:14 +0100 From: Sven Boden Reply-To: list123@pandora.be User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923) X-Accept-Language: en-us, en MIME-Version: 1.0 To: user-java@ibatis.apache.org Subject: Re: Very slow query References: <1142615625.13224.34.camel@isol16.vilspa.esa.int> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N The pool query is not used as Pool.PingEnabled is false. ;-) Try rerunning it setting cacheModelsEnabled to false (for a performance run, in a real system if you have a cache hit the cache speeds up processing, for a single run a cache slows down), and switch off debugging if you have it on. Regards, Sven Larry Meadors wrote: > > >What is "data_set", and how long does "select * from data_set" take to run? > >Larry > > >On 3/17/06, Nicolas Fajersztejn wrote: > > >> Hi, >> >> I'm new to iBatis. I have been using it for a couple of months and really >>like it. >> >> However, now I am having problems with a very simple query. This is the >>mapping I have: >> >> >> >> >> obsid is a numeric value. I am passing an Integer as parameter and this >>query takes about 1400 ms to execute!!! >> The same query run with explicit value (obsid = 100 for example) takes only >>48 ms. >> >> Does it really take so much time to convert an Integer and build up the >>query or am I missing something? >> >> This is my config file in case it helps: >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> > cacheModelsEnabled="true" >> enhancementEnabled="true" >> lazyLoadingEnabled="true" >> maxRequests="32" >> maxSessions="10" >> maxTransactions="5" >> useStatementNamespaces="false" >> /> >> >> >> And the Java code: >> >> public static List getExposuresForObsId(Integer obsID) { >> SqlMapClient sqlMap = XATSqlConfig.getSqlMapInstance(); >> List exposureList = null; >> try { >> long t1 = System.currentTimeMillis(); >> exposureList = sqlMap.queryForList("getExposuresForObsId", >>obsID); >> long t2 = System.currentTimeMillis(); >> System.out.println("time queryForList is " + (t2-t1)); >> >> } >> catch (SQLException e) { >> logger.log(Level.WARNING, "SQLException getting exposures list: >>" + e); >> } >> return exposureList; >> } >> >> >> >> I would gladly appreciate your help. >> >> Thanks. >> >> >> >> >> >> >> > > > >