RE: Very slow query

2006-03-21 Thread Nicolas Fajersztejn
$value$ > > > > This instructs iBATIS to paste the value in the query like you do, > instead of using it as a parameter to PreparedStatement. > > > > Hope this clarifies things a bit. > > > > Niels > > > > > __ >

Re: Very slow query

2006-03-21 Thread Larry Meadors
On 3/21/06, Nicolas Fajersztejn <[EMAIL PROTECTED]> wrote: Which of the 2 solutions should I use? Passing BigDecimal and using #value# will most likely be faster if you have more iterations.Larry

RE: Very slow query

2006-03-21 Thread Nicolas Fajersztejn
d to explicitly define the parameterClass, using 'decimal' or 'java.math.BigDecimal'? Niels -Original Message- From: Nicolas Fajersztejn [mailto:[EMAIL PROTECTED]] Sent: dinsdag 21 maart 2006 16:01 To: user-java@ibatis.apache.org Subject: Re: Very slow query Still taking

RE: Very slow query

2006-03-21 Thread Nicolas Fajersztejn
lto:[EMAIL PROTECTED] > Sent: Tuesday, March 21, 2006 5:01 PM > To: user-java@ibatis.apache.org > Subject: Re: Very slow query > > Still taking the same time. > > I tried other query passing a String parameter and it takes about 400ms > (which is considerably less than

RE: Very slow query

2006-03-21 Thread Niels Beekman
Nicolas Fajersztejn [mailto:[EMAIL PROTECTED] Sent: dinsdag 21 maart 2006 16:01 To: user-java@ibatis.apache.org Subject: Re: Very slow query Still taking the same time. I tried other query passing a String parameter and it takes about 400ms (which is considerably less than 1500ms) but seems a lot

Re: Very slow query

2006-03-21 Thread Nicolas Fajersztejn
Hi Nathan, the obsid type is Numeric(6,0)  (I'm using a Sybase DB but I think it maps to the number(p,s) type in Orcacle) CREATE TABLE dbo.exposures (     obsid numeric(6,0) NOT NULL,     inst  varchar(5) NOT NULL,     expno numeric(5,0) NOT NULL,     expid

Re: Very slow query

2006-03-21 Thread Nathan Maves
Nicolas,I am guessing that there is a type mismatch from your db to your parameter.  Please post both the table definition and your bean.if the DB field is a VARCHAR and your parameter is an Integer it can cause problems.id = '123' will have a different performance then id = 123If that is the case

Re: Very slow query

2006-03-21 Thread Nicolas Fajersztejn
Still taking the same time. I tried other query passing a String parameter and it takes about 400ms (which is considerably less than 1500ms) but seems a lot of time to me anyway. With JDBC it takes 8 ms!!! How long is it suppose to take this conversion with iBatis??? Has anybody experienced sim

RE: Very slow query

2006-03-21 Thread seyhan.basmaci
e.. If so, your query will not use any index..   If your queiry using index , then check ibatis side..           From: Nicolas Fajersztejn [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 21, 2006 2:43 PM To: user-java@ibatis.apache.org Subject: Re: Very slow query   Hi again, I

Re: Very slow query

2006-03-21 Thread Nathan Maves
hmmm... did you try to specify the JDBC type on that column?obsid = #obsid:NUMERIC#I am running out of ideas :)NathanOn Mar 21, 2006, at 7:25 AM, Nicolas Fajersztejn wrote: Hi Nathan, the obsid type is Numeric(6,0)  (I'm using a Sybase DB but I think it maps to the number(p,s) type in Orcacle) C

Re: Very slow query

2006-03-21 Thread Nicolas Fajersztejn
Hi again, I have tried all these things you are suggesting: - setting cacheModelsEnabled to false - run the query several times in a loop - disable logging. and still I get the same result. But to me this question is very simple. If I change #value# for the actual number (i.e. 100) in the q

RE: Very slow query

2006-03-21 Thread seyhan.basmaci
Message- From: Nicolas Fajersztejn [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 21, 2006 5:01 PM To: user-java@ibatis.apache.org Subject: Re: Very slow query Still taking the same time. I tried other query passing a String parameter and it takes about 400ms (which is considerably less than

Re: Very slow query

2006-03-20 Thread Clinton Begin
Also make sure logging is disabled.ClintonOn 3/17/06, Larry Meadors <[EMAIL PROTECTED]> wrote: Also, run the query several times, because on the first pass, it issetting up the parameterMap. long t1,t2;t1 = System.currentTimeMillis();for(int i = 0; i++; i < 10) sqlMap.queryForList("getExposuresForO

Re: Very slow query

2006-03-17 Thread Larry Meadors
Also, run the query several times, because on the first pass, it is setting up the parameterMap. long t1,t2; t1 = System.currentTimeMillis(); for(int i = 0; i++; i < 10) sqlMap.queryForList("getExposuresForObsId", obsID); t2 = System.currentTimeMillis(); System.out.println("time to run queryForLis

Re: Very slow query

2006-03-17 Thread Sven Boden
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.

Re: Very slow query

2006-03-17 Thread Nicolas Fajersztejn
data_set is one of the tables in my project. But ping is disable anyway: Is this info relevant to the problem I have? Cheers, Nicolas. On Fri, 2006-03-17 at 10:14 -0700, Larry Meadors wrote: > > > What is "data_set", and how long does "select * from data_set" take to run? > > Larry > >

Re: Very slow query

2006-03-17 Thread Larry Meadors
What is "data_set", and how long does "select * from data_set" take to run? Larry On 3/17/06, Nicolas Fajersztejn <[EMAIL PROTECTED]> 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 simpl