You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by Gerardo Corro Fuentes <ge...@mundivia.net> on 2008/01/28 17:56:48 UTC

poor performance

Hi,
 
I built a DAO with IBatis 2.2.0. Most of this DAO works properly, however thre are a couple of queries that are very slow, it takes 2 minutes for them to be completed while a plain JDBC querie takes only three seconds.
 
I verified the slow quieries many times, and they actually look very similar to others that run very fast.
 
I also Spring 1.2; commons DBCP 1.4.
 
Thanks!!!
 
 
 
The ibatis config file looks like:
 
<settings

cacheModelsEnabled="false"

enhancementEnabled="true"

maxSessions="64"

maxTransactions="8"

maxRequests="128"

useStatementNamespaces="true"/>

 

 

 

 

 

<?sml version="1.0" encoding="UTF-8" ?>

<!DOCTYPE sqlMap

PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN"

"http://www.ibatis.com/dtd/sql-map-2.dtd">

<sqlMap namespace="CurvaHoraria">

<typeAlias alias="curvaHoraria" type="com.db.dto.DTO1"/> 

<resultMap id="curvaHorariaResult" class="curvaHoraria">

<result property="guidPm" column="guid_pm"/>

<result property="fecha" column="fecha"/>

<result property="periodo1" column="valor_h01"/>

<result property="periodo2" column="valor_h02"/>

<result property="periodo3" column="valor_h03"/>

<result property="periodo4" column="valor_h04"/>

<result property="periodo5" column="valor_h05"/>

<result property="periodo6" column="valor_h06"/>

<result property="periodo7" column="valor_h07"/>

<result property="periodo8" column="valor_h08"/>

<result property="periodo9" column="valor_h09"/>

<result property="periodo10" column="valor_h10"/>

<result property="periodo11" column="valor_h11"/>

<result property="periodo12" column="valor_h12"/>

<result property="periodo13" column="valor_h13"/>

<result property="periodo14" column="valor_h14"/>

<result property="periodo15" column="valor_h15"/>

<result property="periodo16" column="valor_h16"/>

<result property="periodo17" column="valor_h17"/>

<result property="periodo18" column="valor_h18"/>

<result property="periodo19" column="valor_h19"/>

<result property="periodo20" column="valor_h20"/>

<result property="periodo21" column="valor_h21"/>

<result property="periodo22" column="valor_h22"/>

<result property="periodo23" column="valor_h23"/>

<result property="periodo24" column="valor_h24"/>

<result property="periodo25" column="valor_h25"/>

</resultMap>

<sql id="fragmento_fechas">

(

vwpm.f_desde_pf <![CDATA[<=]]> to_date(#fecha_desde#,'yyyymmdd')

OR vwpm.f_desde_pf <![CDATA[<=]]> to_date(#fecha_hasta#,'yyyymmdd')

) 

AND (

vwpm.f_hasta_pf <![CDATA[>=]]> to_date(#fecha_desde#,'yyyymmdd')

OR vwpm.f_hasta_pf <![CDATA[>=]]> to_date(#fecha_hasta#,'yyyymmdd')

)

AND (

vwpm.f_desde_pm <![CDATA[<=]]> to_date(#fecha_desde#,'yyyymmdd')

OR vwpm.f_desde_pm <![CDATA[<=]]> to_date(#fecha_hasta#,'yyyymmdd')

)

AND (

vwpm.f_hasta_pm <![CDATA[>=]]> to_date(#fecha_desde#,'yyyymmdd')

OR vwpm.f_hasta_pm <![CDATA[>=]]> to_date(#fecha_hasta#,'yyyymmdd')

)

AND (

vwpm.f_desde_cpf <![CDATA[<=]]> to_date(#fecha_desde#,'yyyymmdd')

OR vwpm.f_desde_cpf <![CDATA[<=]]> to_date(#fecha_hasta#,'yyyymmdd')

)

AND(

vwpm.f_hasta_cpf <![CDATA[>=]]> to_date(#fecha_desde#,'yyyymmdd')

OR vwpm.f_hasta_cpf <![CDATA[>=]]> to_date(#fecha_hasta#,'yyyymmdd')

)

AND (

vwpm.f_desde_apmpf <![CDATA[<=]]> to_date(#fecha_desde#,'yyyymmdd')

OR vwpm.f_desde_apmpf <![CDATA[<=]]> to_date(#fecha_hasta#,'yyyymmdd')

)

AND (

vwpm.f_hasta_apmpf <![CDATA[>=]]> to_date(#fecha_desde#,'yyyymmdd')

OR vwpm.f_hasta_apmpf <![CDATA[>=]]> to_date(#fecha_hasta#,'yyyymmdd')

)

AND (

vwpm.f_desde_cpm <![CDATA[<=]]> to_date(#fecha_desde#,'yyyymmdd')

OR vwpm.f_desde_cpm <![CDATA[<=]]> to_date(#fecha_hasta#,'yyyymmdd')

)

AND (

vwpm.f_hasta_cpm <![CDATA[>=]]> to_date(#fecha_desde#,'yyyymmdd')

OR vwpm.f_hasta_cpm <![CDATA[>=]]> to_date(#fecha_hasta#,'yyyymmdd')

)

AND (

vwpm.f_desde_cpma <![CDATA[<=]]> to_date(#fecha_desde#,'yyyymmdd')

OR vwpm.f_desde_cpma <![CDATA[<=]]> to_date(#fecha_hasta#,'yyyymmdd')

)

AND (

vwpm.f_hasta_cpma <![CDATA[>=]]> to_date(#fecha_desde#,'yyyymmdd')

OR vwpm.f_hasta_cpma <![CDATA[>=]]> to_date(#fecha_hasta#,'yyyymmdd')

)

AND (

vwpm.f_desde_tc <![CDATA[<=]]> to_date(#fecha_desde#,'yyyymmdd')

OR vwpm.f_desde_tc <![CDATA[<=]]> to_date(#fecha_hasta#,'yyyymmdd')

)

AND (

vwpm.f_hasta_tc <![CDATA[>=]]> to_date(#fecha_desde#,'yyyymmdd')

OR vwpm.f_hasta_tc <![CDATA[>=]]> to_date(#fecha_hasta#,'yyyymmdd')

)

</sql>

<select id="obtenerCurvas" resultMap="curvaHorariaResult" parameterClass="curvaHoraria">

SELECT distinct(guid_pm), fecha, valor_h01, valor_h02, valor_h03, valor_h04, valor_h05, valor_h06, valor_h07, 

valor_h08, valor_h09, valor_h10, valor_h11, valor_h12, valor_h13, valor_h14, valor_h15, valor_h16, valor_h17,

valor_h18, valor_h19, valor_h20, valor_h21, valor_h22, valor_h23, valor_h24, valor_h25 

from FLUMEN.vw_puntos_medida_ve vwpm, flumen.variables_periodo vp, flumen.periodovar p

where vwpm.id_ccaa = vp.id_sitio

and substr(vwpm.tarifa, 1, 1) = substr(vp.tarifa, 1, 1)

and vp.id_var = p.id_var

and p.fecha <![CDATA[>=]]> #fecha_desde#

and p.fecha <![CDATA[<=]]> #fecha_hasta#

AND

<include refid="fragmento_fechas"/>

order by guid_pm, fecha

</select>

<select id="obtenerPMs" resultClass="java.lang.String" parameterClass="curvaHoraria">

select distinct(guid_pm) from FLUMEN.vw_puntos_medida_ve vwpm

WHERE

<include refid="fragmento_fechas"/> 

</select>

</sqlMap>

 

 

 

 

 

 


------------------------------------------------------------------
This e-mail and the documents attached are confidential and intended solely
for the addressee; it may also be privileged. If you receive this e-mail
in error, please notify the sender immediately and destroy it.
As its integrity cannot be secured on the Internet, the Atos Origin group
liability cannot be triggered for the message content. Although the
sender endeavours to maintain a computer virus-free network, the sender does
not warrant that this transmission is virus-free and will not be liable for
any damages resulting from any virus transmitted.

Este mensaje y los ficheros adjuntos pueden contener informacion
confidencial destinada solamente a la(s) persona(s) mencionadas
anteriormente. Pueden estar protegidos por secreto profesional Si usted
recibe este correo electronico por error, gracias de informar inmediatamente
al remitente y destruir el mensaje.
Al no estar asegurada la integridad de este mensaje sobre la red, Atos
Origin no se hace responsable por su contenido. Su contenido no constituye
ningun compromiso para el grupo Atos Origin, salvo ratificacion escrita por
ambas partes.
Aunque se esfuerza al maximo por mantener su red libre de virus, el emisor
no puede garantizar nada al respecto y no sera responsable de cualesquiera
danos que puedan resultar de una transmision de virus
------------------------------------------------------------------


RE: poor performance

Posted by Gerardo Corro Fuentes <ge...@mundivia.net>.
 
After profiling seems like the bottle neck is marshalling, not sure why takes so long to fill the DTOs.
 
 
///Gerardo

________________________________

De: Clinton Begin [mailto:clinton.begin@gmail.com]
Enviado el: lun 28/01/2008 19:05
Para: user-java@ibatis.apache.org
Asunto: RE: poor performance



Very weird indeed.  You may need to use a profiler to figure it out.  NetBeans and Eclipse both have free ones.

 

Clinton

 

From: Gerardo Corro Fuentes [mailto:gerardo.corro@mundivia.net] 
Sent: January-28-08 10:40 AM
To: user-java@ibatis.apache.org
Subject: RE: poor performance

 

Hi,

 

-I cut the DTO marshalling part of the code for sake of brevity.

-Marshalling is not the problem since other ibatis DAO functions use the same DAO and read a lot of data and get results in few seconds

-I used the debug level in order to send you the whole info and get better help, but it's usually at level INFO

-This is a very weird problem.

 

Thanks!

 

 

________________________________

De: Clinton Begin [mailto:clinton.begin@gmail.com]
Enviado el: lun 28/01/2008 18:36
Para: user-java@ibatis.apache.org
Asunto: RE: poor performance

Oh,

And TURN OFF debugging logging when you do your timings with iBATIS.  The
iBATIS java.sql.* logs are very slow (think method level interceptor that
writes to the console!) and are only intended for debugging purposes.

Clinton 

-----Original Message-----
From: Gerardo Corro Fuentes [mailto:gerardo.corro@mundivia.net]
Sent: January-28-08 10:26 AM
To: user-java@ibatis.apache.org
Subject: RE: poor performance

Hi,

I must download big portions of data, the queries that work properly do that
with no problems at all. Next I'm attaching a JDBC class that retrieves the
data in three seconds, and after that comes the logs that show how ibatis
takes more than two minutes to do the same.

Thanks a lot!!!

package test;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import org.apache.commons.dbcp.BasicDataSource;
import com.mundivia.flumen.db.common.FactoriaSpring;
public class QueryTest {
 public static void main(String args[]) throws SQLException{

 
  BasicDataSource ds = (BasicDataSource)
FactoriaSpring.getApplicationContext().getBean("dataSource");
  Connection con = ds.getConnection();
  Statement stmt = con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,
    ResultSet.CONCUR_READ_ONLY);
 
  long start = System.currentTimeMillis();
 
 
  ResultSet srs = stmt.executeQuery("SELECT distinct(guid_pm), fecha,
valor_h01, valor_h02, valor_h03, valor_h04, valor_h05, valor_h06, valor_h07,
" +
    "valor_h08, valor_h09, valor_h10, valor_h11, valor_h12, valor_h13,
valor_h14, valor_h15, valor_h16, valor_h17, " +
    "valor_h18, valor_h19, valor_h20, valor_h21, valor_h22, valor_h23,
valor_h24, valor_h25 " +
    "from FLUMEN.vw_puntos_medida_ve vwpm, flumen.variables_periodo vp,
flumen.periodovar p " +
    "where vwpm.id_ccaa = vp.id_sitio " +
    "and substr(vwpm.tarifa, 1, 1) = substr(vp.tarifa, 1, 1) " +
    "and vp.id_var = p.id_var " +
    "and p.fecha >= '20071001' " +
    "and p.fecha <= '20071031' " +
    "AND " +
    "                      ( " +
    "                       vwpm.f_desde_pf <=
to_date('20071001','yyyymmdd') " +
    "                       OR vwpm.f_desde_pf <=
to_date('20071031','yyyymmdd') " +
    "          )    " +                             
    "  AND ( " +
    "              vwpm.f_hasta_pf >= to_date('20071001','yyyymmdd') " +
    "              OR vwpm.f_hasta_pf >= to_date('20071031','yyyymmdd') " +
    "  ) " +
    "  AND ( " +
    "                       vwpm.f_desde_pm <=
to_date('20071001','yyyymmdd') " +
    "                       OR vwpm.f_desde_pm <=
to_date('20071031','yyyymmdd') " +
    "  ) " +
    "  AND ( " +
    "                      vwpm.f_hasta_pm >= to_date('20071001','yyyymmdd')
" +
    "                      OR vwpm.f_hasta_pm >=
to_date('20071031','yyyymmdd') " +
    "  ) " +
    "  AND ( " +
    "                       vwpm.f_desde_cpf <=
to_date('20071001','yyyymmdd') " +
    "                       OR vwpm.f_desde_cpf <=
to_date('20071031','yyyymmdd') " +
    "  ) " +
    " AND( " +
    "                       vwpm.f_hasta_cpf >=
to_date('20071001','yyyymmdd') " +
    "                       OR vwpm.f_hasta_cpf >=
to_date('20071031','yyyymmdd') " +
    " )" +
    "  AND  ( " +
    "                       vwpm.f_desde_apmpf <=
to_date('20071001','yyyymmdd') " +
    "                       OR vwpm.f_desde_apmpf <=
to_date('20071031','yyyymmdd') " +
    " ) " +
    "  AND ( " +
    "                       vwpm.f_hasta_apmpf >=
to_date('20071001','yyyymmdd') " +
    "                       OR vwpm.f_hasta_apmpf >=
to_date('20071031','yyyymmdd') " +
    "  ) " +
    "  AND ( " +
    "                       vwpm.f_desde_cpm <=
to_date('20071001','yyyymmdd') " +
    "                       OR vwpm.f_desde_cpm <=
to_date('20071031','yyyymmdd') " +
    "  ) " +
    "  AND ( " +
    "                       vwpm.f_hasta_cpm >=
to_date('20071001','yyyymmdd') " +
    "                       OR vwpm.f_hasta_cpm >=
to_date('20071031','yyyymmdd') " +
    "  ) " +
    "  AND ( " +
    "                       vwpm.f_desde_cpma <=
to_date('20071001','yyyymmdd') " +
    "                       OR vwpm.f_desde_cpma <=
to_date('20071031','yyyymmdd') " +
    "  ) " +
    "  AND ( " +
    "                       vwpm.f_hasta_cpma >=
to_date('20071001','yyyymmdd') " +
    "                       OR vwpm.f_hasta_cpma >=
to_date('20071031','yyyymmdd') " +
    " ) " +
    " AND ( " +
    "                       vwpm.f_desde_tc <=
to_date('20071001','yyyymmdd') " +
    "                       OR vwpm.f_desde_tc <=
to_date('20071031','yyyymmdd') " +
    "  ) " +
    "  AND ( " +
    "                       vwpm.f_hasta_tc >=
to_date('20071001','yyyymmdd') " +
    "                       OR vwpm.f_hasta_tc >=
to_date('20071031','yyyymmdd') " +
    "  ) " +
  " order by guid_pm, fecha ");
  while (srs.next()) {
   //System.out.print("\nObtengo pm: " + srs.getString(1));
  }
 
  System.out.print("Se tardó: " +  (System.currentTimeMillis()-start));
 }
}


The logs are:

[main] INFO - Loading XML bean definitions from class path resource
[applicationContext-dao.xml]

[main] INFO - Loading XML bean definitions from class path resource
[applicationContext-dao-transacciones.xml]

[main] INFO - Loading XML bean definitions from class path resource
[applicationContext-service.xml]

[main] INFO - Bean factory for application context
[org.springframework.context.support.ClassPathXmlApplicationContext;hashCode
=19475750]:
org.springframework.beans.factory.support.DefaultListableBeanFactory
defining beans
[sqlMapClientTemplate,Prelacion0DAOTarget,Prelacion1DAOTarget,Prelacion2DAOT
arget,Prelacion3DAOTarget,CalculoMVHDAOTarget,Prelacion4DAOTarget,Prelacion6
DAOTarget,Prelacion7DAOTarget,Prelacion8DAOTarget,AltaMVHDAOTarget,propertyC
onfigurer,sqlMapClient,dataSource,Prelacion0DAO,Prelacion1DAO,Prelacion2DAO,
Prelacion3DAO,Prelacion4DAO,Prelacion6DAO,Prelacion7DAO,Prelacion8DAO,Calcul
oMVHDAO,AltaMVHDAO,transactionManager,defaultTxAttributes,Prelacion0Servicio
Target,Prelacion1ServicioTarget,Prelacion2ServicioTarget,Prelacion3ServicioT
arget,CurvaHorariaServicioTarget,Prelacion4ServicioTarget,Prelacion6Servicio
Target,Prelacion7ServicioTarget,Prelacion8ServicioTarget,AltaMVHServicioTarg
et,Prelacion0Servicio,Prelacion1Servicio,Prelacion2Servicio,Prelacion3Servic
io,Prelacion4Servicio,Prelacion6Servicio,Prelacion7Servicio,Prelacion8Servic
io,AltaMVHServicio,CurvaHorariaServicio]; root of BeanFactory hierarchy

[main] INFO - 46 beans defined in application context
[org.springframework.context.support.ClassPathXmlApplicationContext;hashCode
=19475750]

[main] INFO - Creating shared instance of singleton bean
'propertyConfigurer'

[main] INFO - Loading properties from class path resource
[database.properties]

[main] INFO - JDK 1.4+ collections available

[main] INFO - Commons Collections 3.x available

[main] INFO - Unable to locate MessageSource with name 'messageSource':
using default
[org.springframework.context.support.DelegatingMessageSource@82764b]

[main] INFO - Unable to locate ApplicationEventMulticaster with name
'applicationEventMulticaster': using default
[org.springframework.context.event.SimpleApplicationEventMulticaster@1bf3d87
]

[main] INFO - Pre-instantiating singletons in factory
[org.springframework.beans.factory.support.DefaultListableBeanFactory
defining beans
[sqlMapClientTemplate,Prelacion0DAOTarget,Prelacion1DAOTarget,Prelacion2DAOT
arget,Prelacion3DAOTarget,CalculoMVHDAOTarget,Prelacion4DAOTarget,Prelacion6
DAOTarget,Prelacion7DAOTarget,Prelacion8DAOTarget,AltaMVHDAOTarget,propertyC
onfigurer,sqlMapClient,dataSource,Prelacion0DAO,Prelacion1DAO,Prelacion2DAO,
Prelacion3DAO,Prelacion4DAO,Prelacion6DAO,Prelacion7DAO,Prelacion8DAO,Calcul
oMVHDAO,AltaMVHDAO,transactionManager,defaultTxAttributes,Prelacion0Servicio
Target,Prelacion1ServicioTarget,Prelacion2ServicioTarget,Prelacion3ServicioT
arget,CurvaHorariaServicioTarget,Prelacion4ServicioTarget,Prelacion6Servicio
Target,Prelacion7ServicioTarget,Prelacion8ServicioTarget,AltaMVHServicioTarg
et,Prelacion0Servicio,Prelacion1Servicio,Prelacion2Servicio,Prelacion3Servic
io,Prelacion4Servicio,Prelacion6Servicio,Prelacion7Servicio,Prelacion8Servic
io,AltaMVHServicio,CurvaHorariaServicio]; root of BeanFactory hierarchy]

[main] INFO - Creating shared instance of singleton bean
'sqlMapClientTemplate'

[main] INFO - Creating shared instance of singleton bean 'sqlMapClient'

[main] INFO - Creating shared instance of singleton bean 'dataSource'

[main] INFO - Creating shared instance of singleton bean
'Prelacion0DAOTarget'

[main] INFO - Creating shared instance of singleton bean
'Prelacion1DAOTarget'

[main] INFO - Creating shared instance of singleton bean
'Prelacion2DAOTarget'

[main] INFO - Creating shared instance of singleton bean
'Prelacion3DAOTarget'

[main] INFO - Creating shared instance of singleton bean
'CalculoMVHDAOTarget'

[main] INFO - Creating shared instance of singleton bean
'Prelacion4DAOTarget'

[main] INFO - Creating shared instance of singleton bean
'Prelacion6DAOTarget'

[main] INFO - Creating shared instance of singleton bean
'Prelacion7DAOTarget'

[main] INFO - Creating shared instance of singleton bean
'Prelacion8DAOTarget'

[main] INFO - Creating shared instance of singleton bean 'AltaMVHDAOTarget'

[main] INFO - Creating shared instance of singleton bean 'Prelacion0DAO'

[main] INFO - CGLIB2 not available: proxyTargetClass feature disabled

[main] INFO - Creating shared instance of singleton bean
'transactionManager'

[main] INFO - Creating shared instance of singleton bean
'defaultTxAttributes'

[main] INFO - Creating shared instance of singleton bean 'Prelacion1DAO'

[main] INFO - Creating shared instance of singleton bean 'Prelacion2DAO'

[main] INFO - Creating shared instance of singleton bean 'Prelacion3DAO'

[main] INFO - Creating shared instance of singleton bean 'Prelacion4DAO'

[main] INFO - Creating shared instance of singleton bean 'Prelacion6DAO'

[main] INFO - Creating shared instance of singleton bean 'Prelacion7DAO'

[main] INFO - Creating shared instance of singleton bean 'Prelacion8DAO'

[main] INFO - Creating shared instance of singleton bean 'CalculoMVHDAO'

[main] INFO - Creating shared instance of singleton bean 'AltaMVHDAO'

[main] INFO - Creating shared instance of singleton bean
'Prelacion0Servicio'

[main] INFO - Creating shared instance of singleton bean
'Prelacion1Servicio'

[main] INFO - Creating shared instance of singleton bean
'Prelacion2Servicio'

[main] INFO - Creating shared instance of singleton bean
'Prelacion3Servicio'

[main] INFO - Creating shared instance of singleton bean
'Prelacion4Servicio'

[main] INFO - Creating shared instance of singleton bean
'Prelacion6Servicio'

[main] INFO - Creating shared instance of singleton bean
'Prelacion7Servicio'

[main] INFO - Creating shared instance of singleton bean
'Prelacion8Servicio'

[main] INFO - Creating shared instance of singleton bean 'AltaMVHServicio'

[main] INFO - Creating shared instance of singleton bean
'CurvaHorariaServicio'

[main] INFO - JDBC 3.0 Savepoint class is available

[main] DEBUG - Using transaction object
[org.springframework.jdbc.datasource.DataSourceTransactionManager$DataSource
TransactionObject@187c55c]

[main] INFO - Prelacion1ServicioImpl:buscarPrelacion0 ...se van a buscar los
datos para prelacion 0

[main] DEBUG - Using transaction object
[org.springframework.jdbc.datasource.DataSourceTransactionManager$DataSource
TransactionObject@b02928]

[main] DEBUG - Executing action directly on SqlMapClient

[main] DEBUG - Opening JDBC Connection

[main] DEBUG - Registering transaction synchronization for JDBC Connection

[main] DEBUG - {conn-100000} Connection

[main] DEBUG - {conn-100000} Preparing Statement: select distinct(guid_pm)
from FLUMEN.vw_puntos_medida_ve vwpm WHERE ( vwpm.f_desde_pf <=
to_date(?,'yyyymmdd') OR vwpm.f_desde_pf <= to_date(?,'yyyymmdd') ) AND (
vwpm.f_hasta_pf >= to_date(?,'yyyymmdd') OR vwpm.f_hasta_pf >=
to_date(?,'yyyymmdd') ) AND ( vwpm.f_desde_pm <= to_date(?,'yyyymmdd') OR
vwpm.f_desde_pm <= to_date(?,'yyyymmdd') ) AND ( vwpm.f_hasta_pm >=
to_date(?,'yyyymmdd') OR vwpm.f_hasta_pm >= to_date(?,'yyyymmdd') ) AND (
vwpm.f_desde_cpf <= to_date(?,'yyyymmdd') OR vwpm.f_desde_cpf <=
to_date(?,'yyyymmdd') ) AND( vwpm.f_hasta_cpf >= to_date(?,'yyyymmdd') OR
vwpm.f_hasta_cpf >= to_date(?,'yyyymmdd') ) AND ( vwpm.f_desde_apmpf <=
to_date(?,'yyyymmdd') OR vwpm.f_desde_apmpf <= to_date(?,'yyyymmdd') ) AND (
vwpm.f_hasta_apmpf >= to_date(?,'yyyymmdd') OR vwpm.f_hasta_apmpf >=
to_date(?,'yyyymmdd') ) AND ( vwpm.f_desde_cpm <= to_date(?,'yyyymmdd') OR
vwpm.f_desde_cpm <= to_date(?,'yyyymmdd') ) AND ( vwpm.f_hasta_cpm >=
to_date(?,'yyyymmdd') OR vwpm.f_hasta_cpm >= to_date(?,'yyyymmdd') ) AND (
vwpm.f_desde_cpma <= to_date(?,'yyyymmdd') OR vwpm.f_desde_cpma <=
to_date(?,'yyyymmdd') ) AND ( vwpm.f_hasta_cpma >= to_date(?,'yyyymmdd') OR
vwpm.f_hasta_cpma >= to_date(?,'yyyymmdd') ) AND ( vwpm.f_desde_tc <=
to_date(?,'yyyymmdd') OR vwpm.f_desde_tc <= to_date(?,'yyyymmdd') ) AND (
vwpm.f_hasta_tc >= to_date(?,'yyyymmdd') OR vwpm.f_hasta_tc >=
to_date(?,'yyyymmdd') )

[main] DEBUG - {pstm-100001} Executing Statement: select distinct(guid_pm)
from FLUMEN.vw_puntos_medida_ve vwpm WHERE ( vwpm.f_desde_pf <=
to_date(?,'yyyymmdd') OR vwpm.f_desde_pf <= to_date(?,'yyyymmdd') ) AND (
vwpm.f_hasta_pf >= to_date(?,'yyyymmdd') OR vwpm.f_hasta_pf >=
to_date(?,'yyyymmdd') ) AND ( vwpm.f_desde_pm <= to_date(?,'yyyymmdd') OR
vwpm.f_desde_pm <= to_date(?,'yyyymmdd') ) AND ( vwpm.f_hasta_pm >=
to_date(?,'yyyymmdd') OR vwpm.f_hasta_pm >= to_date(?,'yyyymmdd') ) AND (
vwpm.f_desde_cpf <= to_date(?,'yyyymmdd') OR vwpm.f_desde_cpf <=
to_date(?,'yyyymmdd') ) AND( vwpm.f_hasta_cpf >= to_date(?,'yyyymmdd') OR
vwpm.f_hasta_cpf >= to_date(?,'yyyymmdd') ) AND ( vwpm.f_desde_apmpf <=
to_date(?,'yyyymmdd') OR vwpm.f_desde_apmpf <= to_date(?,'yyyymmdd') ) AND (
vwpm.f_hasta_apmpf >= to_date(?,'yyyymmdd') OR vwpm.f_hasta_apmpf >=
to_date(?,'yyyymmdd') ) AND ( vwpm.f_desde_cpm <= to_date(?,'yyyymmdd') OR
vwpm.f_desde_cpm <= to_date(?,'yyyymmdd') ) AND ( vwpm.f_hasta_cpm >=
to_date(?,'yyyymmdd') OR vwpm.f_hasta_cpm >= to_date(?,'yyyymmdd') ) AND (
vwpm.f_desde_cpma <= to_date(?,'yyyymmdd') OR vwpm.f_desde_cpma <=
to_date(?,'yyyymmdd') ) AND ( vwpm.f_hasta_cpma >= to_date(?,'yyyymmdd') OR
vwpm.f_hasta_cpma >= to_date(?,'yyyymmdd') ) AND ( vwpm.f_desde_tc <=
to_date(?,'yyyymmdd') OR vwpm.f_desde_tc <= to_date(?,'yyyymmdd') ) AND (
vwpm.f_hasta_tc >= to_date(?,'yyyymmdd') OR vwpm.f_hasta_tc >=
to_date(?,'yyyymmdd') )

[main] DEBUG - {pstm-100001} Parameters: [20071001, 20071030, 20071001,
20071030, 20071001, 20071030, 20071001, 20071030, 20071001, 20071030,
20071001, 20071030, 20071001, 20071030, 20071001, 20071030, 20071001,
20071030, 20071001, 20071030, 20071001, 20071030, 20071001, 20071030,
20071001, 20071030, 20071001, 20071030]

[main] DEBUG - {pstm-100001} Types: [java.lang.String, java.lang.String,
java.lang.String, java.lang.String, java.lang.String, java.lang.String,
java.lang.String, java.lang.String, java.lang.String, java.lang.String,
java.lang.String, java.lang.String, java.lang.String, java.lang.String,
java.lang.String, java.lang.String, java.lang.String, java.lang.String,
java.lang.String, java.lang.String, java.lang.String, java.lang.String,
java.lang.String, java.lang.String, java.lang.String, java.lang.String,
java.lang.String, java.lang.String]

[main] DEBUG - {rset-100002} ResultSet

[main] DEBUG - {rset-100002} Header: [GUID_PM]

[main] DEBUG - {rset-100002} Result: [7322]

[main] DEBUG - {rset-100002} Result: [7305]

[main] DEBUG - {rset-100002} Result: [1270102]

[main] DEBUG - {rset-100002} Result: [7298]

[main] DEBUG - {rset-100002} Result: [1284195]

[main] DEBUG - {rset-100002} Result: [1285724]

[main] DEBUG - {rset-100002} Result: [7539]

[main] DEBUG - {rset-100002} Result: [1309723]

[main] DEBUG - {rset-100002} Result: [1285091]

[main] DEBUG - {rset-100002} Result: [1323673]

[main] DEBUG - {rset-100002} Result: [1284043]

[main] DEBUG - {rset-100002} Result: [1283520]

[main] DEBUG - {rset-100002} Result: [38286]

[main] DEBUG - {rset-100002} Result: [1297556]

[main] DEBUG - {rset-100002} Result: [7542]

[main] DEBUG - {rset-100002} Result: [49352]

[main] DEBUG - {rset-100002} Result: [1305525]

[main] DEBUG - {rset-100002} Result: [1317347]

[main] DEBUG - {rset-100002} Result: [1297637]

[main] DEBUG - {rset-100002} Result: [1314151]

[main] DEBUG - {rset-100002} Result: [1324687]

[main] DEBUG - {rset-100002} Result: [1297583]

[main] DEBUG - {rset-100002} Result: [1297565]

[main] DEBUG - {rset-100002} Result: [1270186]

[main] DEBUG - {rset-100002} Result: [7300]

[main] DEBUG - {rset-100002} Result: [7294]

[main] DEBUG - {rset-100002} Result: [1314597]

[main] DEBUG - {rset-100002} Result: [1297855]

[main] DEBUG - {rset-100002} Result: [1314514]

[main] DEBUG - {rset-100002} Result: [1297619]

[main] DEBUG - {rset-100002} Result: [1305437]

[main] DEBUG - {rset-100002} Result: [1297437]

[main] DEBUG - {rset-100002} Result: [54124]

[main] DEBUG - {rset-100002} Result: [1306645]

[main] DEBUG - {rset-100002} Result: [1184876]

[main] DEBUG - {rset-100002} Result: [57808]

[main] DEBUG - {rset-100002} Result: [7471]

[main] DEBUG - {rset-100002} Result: [7520]

[main] DEBUG - {rset-100002} Result: [1322275]

[main] DEBUG - {rset-100002} Result: [1312879]

[main] DEBUG - {rset-100002} Result: [1312870]

[main] DEBUG - {rset-100002} Result: [1297497]

[main] DEBUG - {rset-100002} Result: [1297574]

[main] DEBUG - {rset-100002} Result: [1287044]

[main] DEBUG - {rset-100002} Result: [1314133]

[main] DEBUG - {rset-100002} Result: [1309732]

[main] DEBUG - {rset-100002} Result: [1314169]

[main] DEBUG - {rset-100002} Result: [58574]

[main] DEBUG - {rset-100002} Result: [1285781]

[main] DEBUG - {rset-100002} Result: [1297646]

[main] DEBUG - {rset-100002} Result: [7519]

[main] DEBUG - {rset-100002} Result: [1198695]

[main] DEBUG - {rset-100002} Result: [1306636]

[main] DEBUG - {rset-100002} Result: [48449]

[main] DEBUG - {rset-100002} Result: [1297628]

[main] DEBUG - {rset-100002} Result: [7522]

[main] DEBUG - {rset-100002} Result: [48738]

[main] DEBUG - {rset-100002} Result: [1270084]

[main] DEBUG - {rset-100002} Result: [1297419]

[main] DEBUG - {rset-100002} Result: [1314615]

[main] DEBUG - {rset-100002} Result: [1314606]

[main] DEBUG - {rset-100002} Result: [1313946]

[main] DEBUG - {rset-100002} Result: [1331045]

[main] DEBUG - {rset-100002} Result: [7469]

[main] DEBUG - {rset-100002} Result: [7283]

[main] DEBUG - {rset-100002} Result: [1297713]

[main] DEBUG - {rset-100002} Result: [1314550]

[main] DEBUG - {rset-100002} Result: [1324705]

[main] DEBUG - {rset-100002} Result: [1324669]

[main] DEBUG - {rset-100002} Result: [58584]

[main] DEBUG - {rset-100002} Result: [1305265]

[main] DEBUG - {rset-100002} Result: [1297683]

[main] DEBUG - {rset-100002} Result: [1312915]

[main] DEBUG - {rset-100002} Result: [1314142]

[main] DEBUG - {rset-100002} Result: [1297704]

[main] DEBUG - {rset-100002} Result: [1298358]

[main] DEBUG - {rset-100002} Result: [1297488]

[main] DEBUG - {rset-100002} Result: [1314541]

[main] DEBUG - {rset-100002} Result: [1324678]

[main] DEBUG - {rset-100002} Result: [57836]

[main] DEBUG - {rset-100002} Result: [57843]

[main] DEBUG - {rset-100002} Result: [1283553]

[main] DEBUG - {rset-100002} Result: [1286950]

[main] DEBUG - {rset-100002} Result: [7326]

[main] DEBUG - {rset-100002} Result: [7308]

[main] DEBUG - {rset-100002} Result: [1283436]

[main] DEBUG - {rset-100002} Result: [1285149]

[main] DEBUG - {rset-100002} Result: [1324273]

[main] DEBUG - {rset-100002} Result: [1285837]

[main] DEBUG - {rset-100002} Result: [1305880]

[main] DEBUG - {rset-100002} Result: [1204464]

[main] DEBUG - {rset-100002} Result: [7521]

[main] DEBUG - {rset-100002} Result: [7285]

[main] DEBUG - {rset-100002} Result: [1314523]

[main] DEBUG - {rset-100002} Result: [1314160]

[main] DEBUG - {rset-100002} Result: [1306244]

[main] DEBUG - {rset-100002} Result: [1296858]

[main] DEBUG - {rset-100002} Result: [48429]

[main] DEBUG - {rset-100002} Result: [1306169]

[main] DEBUG - {rset-100002} Result: [1285695]

[main] DEBUG - {rset-100002} Result: [1305274]

[main] DEBUG - {rset-100002} Result: [1306474]

[main] DEBUG - {rset-100002} Result: [6889]

[main] DEBUG - {rset-100002} Result: [1319257]

[main] DEBUG - {rset-100002} Result: [1324696]

[main] DEBUG - {rset-100002} Result: [7320]

[main] DEBUG - {rset-100002} Result: [1297524]

[main] DEBUG - {rset-100002} Result: [1270156]

[main] DEBUG - {rset-100002} Result: [7553]

[main] DEBUG - {rset-100002} Result: [1305552]

[main] DEBUG - {rset-100002} Result: [6877]

[main] DEBUG - {rset-100002} Result: [1195746]

[main] DEBUG - {rset-100002} Result: [26265]

[main] DEBUG - {rset-100002} Result: [1314178]

[main] DEBUG - {rset-100002} Result: [1314851]

[main] DEBUG - {rset-100002} Result: [1312906]

[main] DEBUG - {rset-100002} Result: [54089]

[main] DEBUG - {rset-100002} Result: [6871]

[main] DEBUG - {rset-100002} Result: [48388]

[main] DEBUG - {rset-100002} Result: [1324723]

[main] DEBUG - {rset-100002} Result: [1312897]

[main] DEBUG - {rset-100002} Result: [1285503]

[main] DEBUG - {rset-100002} Result: [1314633]

[main] DEBUG - {rset-100002} Result: [1306160]

[main] DEBUG - {rset-100002} Result: [1198656]

[main] DEBUG - {rset-100002} Result: [1297695]

[main] DEBUG - {rset-100002} Result: [7307]

[main] DEBUG - {rset-100002} Result: [1285850]

[main] DEBUG - {rset-100002} Result: [1198704]

[main] DEBUG - {rset-100002} Result: [1312888]

[main] DEBUG - {rset-100002} Result: [1296918]

[main] DEBUG - {rset-100002} Result: [1305534]

[main] DEBUG - {rset-100002} Result: [1312993]

[main] DEBUG - {rset-100002} Result: [1285533]

[main] DEBUG - {rset-100002} Result: [1270138]

[main] DEBUG - {rset-100002} Result: [1319282]

[main] DEBUG - {rset-100002} Result: [7290]

[main] DEBUG - {rset-100002} Result: [7289]

[main] DEBUG - {rset-100002} Result: [38291]

[main] DEBUG - {rset-100002} Result: [7541]

[main] DEBUG - {rset-100002} Result: [7287]

[main] DEBUG - {rset-100002} Result: [7284]

[main] DEBUG - {rset-100002} Result: [1297610]

[main] DEBUG - {rset-100002} Result: [1314532]

[main] DEBUG - {rset-100002} Result: [6981]

[main] DEBUG - {rset-100002} Result: [1324714]

[main] DEBUG - {rset-100002} Result: [1305650]

[main] DEBUG - {rset-100002} Result: [1312933]

[main] DEBUG - {rset-100002} Result: [48439]

[main] DEBUG - {rset-100002} Result: [1022538]

[main] DEBUG - {rset-100002} Result: [1285512]

[main] DEBUG - {rset-100002} Result: [1024146]

[main] DEBUG - {rset-100002} Result: [1024231]

[main] DEBUG - {rset-100002} Result: [1306483]

[main] DEBUG - {rset-100002} Result: [1285521]

[main] DEBUG - {rset-100002} Result: [1285862]

[main] DEBUG - {rset-100002} Result: [7327]

[main] DEBUG - {rset-100002} Result: [7301]

[main] DEBUG - {rset-100002} Result: [45626]

[main] DEBUG - {rset-100002} Result: [1314496]

[main] DEBUG - {rset-100002} Result: [1306253]

[main] DEBUG - {rset-100002} Result: [1285661]

[main] DEBUG - {rset-100002} Result: [1297601]

[main] DEBUG - {rset-100002} Result: [1314505]

[main] DEBUG - {rset-100002} Result: [1309714]

[main] DEBUG - {rset-100002} Result: [1305871]

[main] DEBUG - {rset-100002} Result: [1283382]

[main] DEBUG - {rset-100002} Result: [1324282]

[main] DEBUG - {rset-100002} Result: [1283403]

[main] DEBUG - {rset-100002} Result: [7288]

[main] DEBUG - {rset-100002} Result: [1284896]

[main] DEBUG - {rset-100002} Result: [1305862]

[main] DEBUG - {rset-100002} Result: [1312924]

[main] DEBUG - {rset-100002} Result: [1313005]

[main] DEBUG - {rset-100002} Result: [1198679]

[main] DEBUG - {rset-100002} Result: [1317239]

[main] DEBUG - {rset-100002} Result: [45565]

[main] DEBUG - {rset-100002} Result: [1296867]

[main] DEBUG - {rset-100002} Result: [49382]

[main] DEBUG - {rset-100002} Result: [1324264]

[main] DEBUG - {rset-100002} Result: [1294962]

[main] DEBUG - {rset-100002} Result: [1317338]

[main] DEBUG - {rset-100002} Result: [1314624]

[main] DEBUG - {rset-100002} Result: [38296]

[main] DEBUG - {rset-100002} Result: [7306]

[main] DEBUG - {rset-100002} Result: [1270120]

[main] DEBUG - {rset-100002} Result: [1321174]

[main] DEBUG - {rset-100002} Result: [1270198]

[main] DEBUG - {rset-100002} Result: [1283364]

[main] DEBUG - {rset-100002} Result: [7316]

[main] DEBUG - {rset-100002} Result: [7302]

[main] DEBUG - {rset-100002} Result: [7295]

[main] DEBUG - {rset-100002} Result: [6876]

[main] DEBUG - {rset-100002} Result: [26260]

[main] DEBUG - {rset-100002} Result: [1297674]

[main] DEBUG - {rset-100002} Result: [1196863]

[main] DEBUG - {rset-100002} Result: [1314735]

[main] DEBUG - {rset-100002} Result: [1285736]

[main] DEBUG - {rset-100002} Result: [1297428]

[main] DEBUG - {rset-100002} Result: [1195730]

[main] DEBUG - {rset-100002} Result: [1297365]

[main] DEBUG - {rset-100002} Result: [1293213]

[main] DEBUG - {rset-100002} Result: [1324294]

[main] DEBUG - {rset-100002} Result: [1324255]

[main] DEBUG - {rset-100002} Result: [1297547]

[main] DEBUG - {rset-100002} Result: [1305453]

[main] DEBUG - {rset-100002} Result: [7540]

[main] DEBUG - {rset-100002} Result: [1285359]

[main] DEBUG - {rset-100002} Result: [1283583]

[main] DEBUG - {rset-100002} Result: [1305543]

[main] DEBUG - {rset-100002} Result: [1297506]

[main] DEBUG - {rset-100002} Result: [1297592]

[main] DEBUG - {rset-100002} Result: [1022555]

[main] DEBUG - {rset-100002} Result: [58564]

[main] DEBUG - {rset-100002} Result: [1284878]

[main] DEBUG - {rset-100002} Result: [1306151]

[main] DEBUG - Triggering beforeCommit synchronization

[main] DEBUG - Triggering beforeCompletion synchronization

[main] DEBUG - Closing JDBC Connection

[main] DEBUG - Triggering afterCompletion synchronization

[main] DEBUG - Using transaction object
[org.springframework.jdbc.datasource.DataSourceTransactionManager$DataSource
TransactionObject@221e9e]

[main] INFO - Prelacion1ServicioImpl:buscarPrelacion0 ...se van a buscar los
datos para prelacion 0

[main] DEBUG - Using transaction object
[org.springframework.jdbc.datasource.DataSourceTransactionManager$DataSource
TransactionObject@1264eab]

[main] DEBUG - Executing action directly on SqlMapClient

[main] DEBUG - Opening JDBC Connection

[main] DEBUG - Registering transaction synchronization for JDBC Connection

[main] DEBUG - {conn-100003} Connection

[main] DEBUG - {conn-100003} Preparing Statement: SELECT distinct(guid_pm),
fecha, valor_h01, valor_h02, valor_h03, valor_h04, valor_h05, valor_h06,
valor_h07, valor_h08, valor_h09, valor_h10, valor_h11, valor_h12, valor_h13,
valor_h14, valor_h15, valor_h16, valor_h17, valor_h18, valor_h19, valor_h20,
valor_h21, valor_h22, valor_h23, valor_h24, valor_h25 from
FLUMEN.vw_puntos_medida_ve vwpm, flumen.variables_periodo vp,
flumen.periodovar p where vwpm.id_ccaa = vp.id_sitio and substr(vwpm.tarifa,
1, 1) = substr(vp.tarifa, 1, 1) and vp.id_var = p.id_var and p.fecha >= ?
and p.fecha <= ? AND ( vwpm.f_desde_pf <= to_date(?,'yyyymmdd') OR
vwpm.f_desde_pf <= to_date(?,'yyyymmdd') ) AND ( vwpm.f_hasta_pf >=
to_date(?,'yyyymmdd') OR vwpm.f_hasta_pf >= to_date(?,'yyyymmdd') ) AND (
vwpm.f_desde_pm <= to_date(?,'yyyymmdd') OR vwpm.f_desde_pm <=
to_date(?,'yyyymmdd') ) AND ( vwpm.f_hasta_pm >= to_date(?,'yyyymmdd') OR
vwpm.f_hasta_pm >= to_date(?,'yyyymmdd') ) AND ( vwpm.f_desde_cpf <=
to_date(?,'yyyymmdd') OR vwpm.f_desde_cpf <= to_date(?,'yyyymmdd') ) AND(
vwpm.f_hasta_cpf >= to_date(?,'yyyymmdd') OR vwpm.f_hasta_cpf >=
to_date(?,'yyyymmdd') ) AND ( vwpm.f_desde_apmpf <= to_date(?,'yyyymmdd') OR
vwpm.f_desde_apmpf <= to_date(?,'yyyymmdd') ) AND ( vwpm.f_hasta_apmpf >=
to_date(?,'yyyymmdd') OR vwpm.f_hasta_apmpf >= to_date(?,'yyyymmdd') ) AND (
vwpm.f_desde_cpm <= to_date(?,'yyyymmdd') OR vwpm.f_desde_cpm <=
to_date(?,'yyyymmdd') ) AND ( vwpm.f_hasta_cpm >= to_date(?,'yyyymmdd') OR
vwpm.f_hasta_cpm >= to_date(?,'yyyymmdd') ) AND ( vwpm.f_desde_cpma <=
to_date(?,'yyyymmdd') OR vwpm.f_desde_cpma <= to_date(?,'yyyymmdd') ) AND (
vwpm.f_hasta_cpma >= to_date(?,'yyyymmdd') OR vwpm.f_hasta_cpma >=
to_date(?,'yyyymmdd') ) AND ( vwpm.f_desde_tc <= to_date(?,'yyyymmdd') OR
vwpm.f_desde_tc <= to_date(?,'yyyymmdd') ) AND ( vwpm.f_hasta_tc >=
to_date(?,'yyyymmdd') OR vwpm.f_hasta_tc >= to_date(?,'yyyymmdd') ) order by
guid_pm, fecha

[main] DEBUG - {pstm-100004} Executing Statement: SELECT distinct(guid_pm),
fecha, valor_h01, valor_h02, valor_h03, valor_h04, valor_h05, valor_h06,
valor_h07, valor_h08, valor_h09, valor_h10, valor_h11, valor_h12, valor_h13,
valor_h14, valor_h15, valor_h16, valor_h17, valor_h18, valor_h19, valor_h20,
valor_h21, valor_h22, valor_h23, valor_h24, valor_h25 from
FLUMEN.vw_puntos_medida_ve vwpm, flumen.variables_periodo vp,
flumen.periodovar p where vwpm.id_ccaa = vp.id_sitio and substr(vwpm.tarifa,
1, 1) = substr(vp.tarifa, 1, 1) and vp.id_var = p.id_var and p.fecha >= ?
and p.fecha <= ? AND ( vwpm.f_desde_pf <= to_date(?,'yyyymmdd') OR
vwpm.f_desde_pf <= to_date(?,'yyyymmdd') ) AND ( vwpm.f_hasta_pf >=
to_date(?,'yyyymmdd') OR vwpm.f_hasta_pf >= to_date(?,'yyyymmdd') ) AND (
vwpm.f_desde_pm <= to_date(?,'yyyymmdd') OR vwpm.f_desde_pm <=
to_date(?,'yyyymmdd') ) AND ( vwpm.f_hasta_pm >= to_date(?,'yyyymmdd') OR
vwpm.f_hasta_pm >= to_date(?,'yyyymmdd') ) AND ( vwpm.f_desde_cpf <=
to_date(?,'yyyymmdd') OR vwpm.f_desde_cpf <= to_date(?,'yyyymmdd') ) AND(
vwpm.f_hasta_cpf >= to_date(?,'yyyymmdd') OR vwpm.f_hasta_cpf >=
to_date(?,'yyyymmdd') ) AND ( vwpm.f_desde_apmpf <= to_date(?,'yyyymmdd') OR
vwpm.f_desde_apmpf <= to_date(?,'yyyymmdd') ) AND ( vwpm.f_hasta_apmpf >=
to_date(?,'yyyymmdd') OR vwpm.f_hasta_apmpf >= to_date(?,'yyyymmdd') ) AND (
vwpm.f_desde_cpm <= to_date(?,'yyyymmdd') OR vwpm.f_desde_cpm <=
to_date(?,'yyyymmdd') ) AND ( vwpm.f_hasta_cpm >= to_date(?,'yyyymmdd') OR
vwpm.f_hasta_cpm >= to_date(?,'yyyymmdd') ) AND ( vwpm.f_desde_cpma <=
to_date(?,'yyyymmdd') OR vwpm.f_desde_cpma <= to_date(?,'yyyymmdd') ) AND (
vwpm.f_hasta_cpma >= to_date(?,'yyyymmdd') OR vwpm.f_hasta_cpma >=
to_date(?,'yyyymmdd') ) AND ( vwpm.f_desde_tc <= to_date(?,'yyyymmdd') OR
vwpm.f_desde_tc <= to_date(?,'yyyymmdd') ) AND ( vwpm.f_hasta_tc >=
to_date(?,'yyyymmdd') OR vwpm.f_hasta_tc >= to_date(?,'yyyymmdd') ) order by
guid_pm, fecha

[main] DEBUG - {pstm-100004} Parameters: [20071001, 20071030, 20071001,
20071030, 20071001, 20071030, 20071001, 20071030, 20071001, 20071030,
20071001, 20071030, 20071001, 20071030, 20071001, 20071030, 20071001,
20071030, 20071001, 20071030, 20071001, 20071030, 20071001, 20071030,
20071001, 20071030, 20071001, 20071030, 20071001, 20071030]

[main] DEBUG - {pstm-100004} Types: [java.lang.String, java.lang.String,
java.lang.String, java.lang.String, java.lang.String, java.lang.String,
java.lang.String, java.lang.String, java.lang.String, java.lang.String,
java.lang.String, java.lang.String, java.lang.String, java.lang.String,
java.lang.String, java.lang.String, java.lang.String, java.lang.String,
java.lang.String, java.lang.String, java.lang.String, java.lang.String,
java.lang.String, java.lang.String, java.lang.String, java.lang.String,
java.lang.String, java.lang.String, java.lang.String, java.lang.String]

[main] DEBUG - {rset-100005} ResultSet

[main] DEBUG - {rset-100005} Header: [guid_pm, fecha, valor_h01, valor_h02,
valor_h03, valor_h04, valor_h05, valor_h06, valor_h07, valor_h08, valor_h09,
valor_h10, valor_h11, valor_h12, valor_h13, valor_h14, valor_h15, valor_h16,
valor_h17, valor_h18, valor_h19, valor_h20, valor_h21, valor_h22, valor_h23,
valor_h24, valor_h25]

[main] DEBUG - {rset-100005} Result: [6871, 20071001, 6, 6, 6, 6, 6, 6, 6,
6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 5, 5, 5, 5, null]

[main] DEBUG - {rset-100005} Result: [6871, 20071002, 6, 6, 6, 6, 6, 6, 6,
6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 5, 5, 5, 5, null]

[main] DEBUG - {rset-100005} Result: [6871, 20071003, 6, 6, 6, 6, 6, 6, 6,
6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 5, 5, 5, 5, null]



... many more rows here....



[main] DEBUG - {rset-100005} Result: [1331045, 20071027, 6, 6, 6, 6, 6, 6,
6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, null]

[main] DEBUG - {rset-100005} Result: [1331045, 20071028, 6, 6, 6, 6, 6, 6,
6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, null]

[main] DEBUG - {rset-100005} Result: [1331045, 20071029, 6, 6, 6, 6, 6, 6,
6, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 5, 5, 5, 5, null]

[main] DEBUG - {rset-100005} Result: [1331045, 20071030, 6, 6, 6, 6, 6, 6,
6, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 5, 5, 5, 5, null]

[main] DEBUG - Triggering beforeCommit synchronization

[main] DEBUG - Triggering beforeCompletion synchronization

[main] DEBUG - Closing JDBC Connection

[main] DEBUG - Triggering afterCompletion synchronization

[main] INFO - All data was retrieved in: 148278ms


________________________________

De: Randall Svancara [mailto:rsvancara@wsu.edu]
Enviado el: lun 28/01/2008 18:05
Para: user-java@ibatis.apache.org
Asunto: Re: poor performance



Turn on debugging and send the output.  Also send the queries if you can
so that we know what you are trying to query within reason of course.

Also make sure you are querying the same database as you are querying in
with your jdbc driver.  Also make sure you are using query properly,
hitting the indexes and such.

Also, if you are returning back large record sets, consider returning
back smaller record sets, and if you can't, try using paginated results.

I know this some of this seems rudimentary, but let's get rid of the
obvious problems first.

-
Randall Svancara


On Mon, 2008-01-28 at 17:56 +0100, Gerardo Corro Fuentes wrote:
> Hi,
>
> I built a DAO with IBatis 2.2.0. Most of this DAO works properly,
> however thre are a couple of queries that are very slow, it takes 2
> minutes for them to be completed while a plain JDBC querie takes only
> three seconds.
>
> I verified the slow quieries many times, and they actually look very
> similar to others that run very fast.
>
> I also Spring 1.2; commons DBCP 1.4.
>
> Thanks!!!
>
>
>
> The ibatis config file looks like:
>
> <settings
>
> cacheModelsEnabled="false"
>
> enhancementEnabled="true"
>
> maxSessions="64"
>
> maxTransactions="8"
>
> maxRequests="128"
>
> useStatementNamespaces="true"/>
>
>
>
>
>
>
>
>
>
>
>
> <?sml version="1.0" encoding="UTF-8" ?>
>
> <!DOCTYPE sqlMap
>
> PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN"
>
> "http://www.ibatis.com/dtd/sql-map-2.dtd">
>
> <sqlMap namespace="CurvaHoraria">
>
> <typeAlias alias="curvaHoraria" type="com.db.dto.DTO1"/>
>
> <resultMap id="curvaHorariaResult" class="curvaHoraria">
>
> <result property="guidPm" column="guid_pm"/>
>
> <result property="fecha" column="fecha"/>
>
> <result property="periodo1" column="valor_h01"/>
>
> <result property="periodo2" column="valor_h02"/>
>
> <result property="periodo3" column="valor_h03"/>
>
> <result property="periodo4" column="valor_h04"/>
>
> <result property="periodo5" column="valor_h05"/>
>
> <result property="periodo6" column="valor_h06"/>
>
> <result property="periodo7" column="valor_h07"/>
>
> <result property="periodo8" column="valor_h08"/>
>
> <result property="periodo9" column="valor_h09"/>
>
> <result property="periodo10" column="valor_h10"/>
>
> <result property="periodo11" column="valor_h11"/>
>
> <result property="periodo12" column="valor_h12"/>
>
> <result property="periodo13" column="valor_h13"/>
>
> <result property="periodo14" column="valor_h14"/>
>
> <result property="periodo15" column="valor_h15"/>
>
> <result property="periodo16" column="valor_h16"/>
>
> <result property="periodo17" column="valor_h17"/>
>
> <result property="periodo18" column="valor_h18"/>
>
> <result property="periodo19" column="valor_h19"/>
>
> <result property="periodo20" column="valor_h20"/>
>
> <result property="periodo21" column="valor_h21"/>
>
> <result property="periodo22" column="valor_h22"/>
>
> <result property="periodo23" column="valor_h23"/>
>
> <result property="periodo24" column="valor_h24"/>
>
> <result property="periodo25" column="valor_h25"/>
>
> </resultMap>
>
> <sql id="fragmento_fechas">
>
> (
>
> vwpm.f_desde_pf <![CDATA[<=]]> to_date(#fecha_desde#,'yyyymmdd')
>
> OR vwpm.f_desde_pf <![CDATA[<=]]> to_date(#fecha_hasta#,'yyyymmdd')
>
> )
>
> AND (
>
> vwpm.f_hasta_pf <![CDATA[>=]]> to_date(#fecha_desde#,'yyyymmdd')
>
> OR vwpm.f_hasta_pf <![CDATA[>=]]> to_date(#fecha_hasta#,'yyyymmdd')
>
> )
>
> AND (
>
> vwpm.f_desde_pm <![CDATA[<=]]> to_date(#fecha_desde#,'yyyymmdd')
>
> OR vwpm.f_desde_pm <![CDATA[<=]]> to_date(#fecha_hasta#,'yyyymmdd')
>
> )
>
> AND (
>
> vwpm.f_hasta_pm <![CDATA[>=]]> to_date(#fecha_desde#,'yyyymmdd')
>
> OR vwpm.f_hasta_pm <![CDATA[>=]]> to_date(#fecha_hasta#,'yyyymmdd')
>
> )
>
> AND (
>
> vwpm.f_desde_cpf <![CDATA[<=]]> to_date(#fecha_desde#,'yyyymmdd')
>
> OR vwpm.f_desde_cpf <![CDATA[<=]]> to_date(#fecha_hasta#,'yyyymmdd')
>
> )
>
> AND(
>
> vwpm.f_hasta_cpf <![CDATA[>=]]> to_date(#fecha_desde#,'yyyymmdd')
>
> OR vwpm.f_hasta_cpf <![CDATA[>=]]> to_date(#fecha_hasta#,'yyyymmdd')
>
> )
>
> AND (
>
> vwpm.f_desde_apmpf <![CDATA[<=]]> to_date(#fecha_desde#,'yyyymmdd')
>
> OR vwpm.f_desde_apmpf <![CDATA[<=]]> to_date(#fecha_hasta#,'yyyymmdd')
>
> )
>
> AND (
>
> vwpm.f_hasta_apmpf <![CDATA[>=]]> to_date(#fecha_desde#,'yyyymmdd')
>
> OR vwpm.f_hasta_apmpf <![CDATA[>=]]> to_date(#fecha_hasta#,'yyyymmdd')
>
> )
>
> AND (
>
> vwpm.f_desde_cpm <![CDATA[<=]]> to_date(#fecha_desde#,'yyyymmdd')
>
> OR vwpm.f_desde_cpm <![CDATA[<=]]> to_date(#fecha_hasta#,'yyyymmdd')
>
> )
>
> AND (
>
> vwpm.f_hasta_cpm <![CDATA[>=]]> to_date(#fecha_desde#,'yyyymmdd')
>
> OR vwpm.f_hasta_cpm <![CDATA[>=]]> to_date(#fecha_hasta#,'yyyymmdd')
>
> )
>
> AND (
>
> vwpm.f_desde_cpma <![CDATA[<=]]> to_date(#fecha_desde#,'yyyymmdd')
>
> OR vwpm.f_desde_cpma <![CDATA[<=]]> to_date(#fecha_hasta#,'yyyymmdd')
>
> )
>
> AND (
>
> vwpm.f_hasta_cpma <![CDATA[>=]]> to_date(#fecha_desde#,'yyyymmdd')
>
> OR vwpm.f_hasta_cpma <![CDATA[>=]]> to_date(#fecha_hasta#,'yyyymmdd')
>
> )
>
> AND (
>
> vwpm.f_desde_tc <![CDATA[<=]]> to_date(#fecha_desde#,'yyyymmdd')
>
> OR vwpm.f_desde_tc <![CDATA[<=]]> to_date(#fecha_hasta#,'yyyymmdd')
>
> )
>
> AND (
>
> vwpm.f_hasta_tc <![CDATA[>=]]> to_date(#fecha_desde#,'yyyymmdd')
>
> OR vwpm.f_hasta_tc <![CDATA[>=]]> to_date(#fecha_hasta#,'yyyymmdd')
>
> )
>
> </sql>
>
> <select id="obtenerCurvas" resultMap="curvaHorariaResult"
> parameterClass="curvaHoraria">
>
> SELECT distinct(guid_pm), fecha, valor_h01, valor_h02, valor_h03,
> valor_h04, valor_h05, valor_h06, valor_h07,
>
> valor_h08, valor_h09, valor_h10, valor_h11, valor_h12, valor_h13,
> valor_h14, valor_h15, valor_h16, valor_h17,
>
> valor_h18, valor_h19, valor_h20, valor_h21, valor_h22, valor_h23,
> valor_h24, valor_h25
>
> from FLUMEN.vw_puntos_medida_ve vwpm, flumen.variables_periodo vp,
> flumen.periodovar p
>
> where vwpm.id_ccaa = vp.id_sitio
>
> and substr(vwpm.tarifa, 1, 1) = substr(vp.tarifa, 1, 1)
>
> and vp.id_var = p.id_var
>
> and p.fecha <![CDATA[>=]]> #fecha_desde#
>
> and p.fecha <![CDATA[<=]]> #fecha_hasta#
>
> AND
>
> <include refid="fragmento_fechas"/>
>
> order by guid_pm, fecha
>
> </select>
>
> <select id="obtenerPMs" resultClass="java.lang.String"
> parameterClass="curvaHoraria">
>
> select distinct(guid_pm) from FLUMEN.vw_puntos_medida_ve vwpm
>
> WHERE
>
> <include refid="fragmento_fechas"/>
>
> </select>
>
> </sqlMap>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> ------------------------------------------------------------------
> This e-mail and the documents attached are confidential and intended
> solely
> for the addressee; it may also be privileged. If you receive this
> e-mail
> in error, please notify the sender immediately and destroy it.
> As its integrity cannot be secured on the Internet, the Atos Origin
> group
> liability cannot be triggered for the message content. Although the
> sender endeavours to maintain a computer virus-free network, the
> sender does
> not warrant that this transmission is virus-free and will not be
> liable for
> any damages resulting from any virus transmitted.
>
> Este mensaje y los ficheros adjuntos pueden contener informacion
> confidencial destinada solamente a la(s) persona(s) mencionadas
> anteriormente. Pueden estar protegidos por secreto profesional Si
> usted
> recibe este correo electronico por error, gracias de informar
> inmediatamente
> al remitente y destruir el mensaje.
> Al no estar asegurada la integridad de este mensaje sobre la red, Atos
> Origin no se hace responsable por su contenido. Su contenido no
> constituye
> ningun compromiso para el grupo Atos Origin, salvo ratificacion
> escrita por
> ambas partes.
> Aunque se esfuerza al maximo por mantener su red libre de virus, el
> emisor
> no puede garantizar nada al respecto y no sera responsable de
> cualesquiera
> danos que puedan resultar de una transmision de virus
> ------------------------------------------------------------------
>




------------------------------------------------------------------
This e-mail and the documents attached are confidential and intended solely
for the addressee; it may also be privileged. If you receive this e-mail
in error, please notify the sender immediately and destroy it.
As its integrity cannot be secured on the Internet, the Atos Origin group
liability cannot be triggered for the message content. Although the
sender endeavours to maintain a computer virus-free network, the sender does
not warrant that this transmission is virus-free and will not be liable for
any damages resulting from any virus transmitted.

Este mensaje y los ficheros adjuntos pueden contener informacion
confidencial destinada solamente a la(s) persona(s) mencionadas
anteriormente. Pueden estar protegidos por secreto profesional Si usted
recibe este correo electronico por error, gracias de informar inmediatamente
al remitente y destruir el mensaje.
Al no estar asegurada la integridad de este mensaje sobre la red, Atos
Origin no se hace responsable por su contenido. Su contenido no constituye
ningun compromiso para el grupo Atos Origin, salvo ratificacion escrita por
ambas partes.
Aunque se esfuerza al maximo por mantener su red libre de virus, el emisor
no puede garantizar nada al respecto y no sera responsable de cualesquiera
danos que puedan resultar de una transmision de virus
------------------------------------------------------------------



------------------------------------------------------------------
This e-mail and the documents attached are confidential and intended solely
for the addressee; it may also be privileged. If you receive this e-mail
in error, please notify the sender immediately and destroy it.
As its integrity cannot be secured on the Internet, the Atos Origin group
liability cannot be triggered for the message content. Although the
sender endeavours to maintain a computer virus-free network, the sender does
not warrant that this transmission is virus-free and will not be liable for
any damages resulting from any virus transmitted.

Este mensaje y los ficheros adjuntos pueden contener informacion
confidencial destinada solamente a la(s) persona(s) mencionadas
anteriormente. Pueden estar protegidos por secreto profesional Si usted
recibe este correo electronico por error, gracias de informar inmediatamente
al remitente y destruir el mensaje.
Al no estar asegurada la integridad de este mensaje sobre la red, Atos
Origin no se hace responsable por su contenido. Su contenido no constituye
ningun compromiso para el grupo Atos Origin, salvo ratificacion escrita por
ambas partes.
Aunque se esfuerza al maximo por mantener su red libre de virus, el emisor
no puede garantizar nada al respecto y no sera responsable de cualesquiera
danos que puedan resultar de una transmision de virus
------------------------------------------------------------------


------------------------------------------------------------------
This e-mail and the documents attached are confidential and intended solely
for the addressee; it may also be privileged. If you receive this e-mail
in error, please notify the sender immediately and destroy it.
As its integrity cannot be secured on the Internet, the Atos Origin group
liability cannot be triggered for the message content. Although the
sender endeavours to maintain a computer virus-free network, the sender does
not warrant that this transmission is virus-free and will not be liable for
any damages resulting from any virus transmitted.

Este mensaje y los ficheros adjuntos pueden contener informacion
confidencial destinada solamente a la(s) persona(s) mencionadas
anteriormente. Pueden estar protegidos por secreto profesional Si usted
recibe este correo electronico por error, gracias de informar inmediatamente
al remitente y destruir el mensaje.
Al no estar asegurada la integridad de este mensaje sobre la red, Atos
Origin no se hace responsable por su contenido. Su contenido no constituye
ningun compromiso para el grupo Atos Origin, salvo ratificacion escrita por
ambas partes.
Aunque se esfuerza al maximo por mantener su red libre de virus, el emisor
no puede garantizar nada al respecto y no sera responsable de cualesquiera
danos que puedan resultar de una transmision de virus
------------------------------------------------------------------


RE: poor performance

Posted by Clinton Begin <cl...@gmail.com>.
Very weird indeed.  You may need to use a profiler to figure it out.
NetBeans and Eclipse both have free ones.

 

Clinton

 

From: Gerardo Corro Fuentes [mailto:gerardo.corro@mundivia.net] 
Sent: January-28-08 10:40 AM
To: user-java@ibatis.apache.org
Subject: RE: poor performance

 

Hi,

 

-I cut the DTO marshalling part of the code for sake of brevity.

-Marshalling is not the problem since other ibatis DAO functions use the
same DAO and read a lot of data and get results in few seconds

-I used the debug level in order to send you the whole info and get better
help, but it's usually at level INFO

-This is a very weird problem.

 

Thanks!

 

 

  _____  

De: Clinton Begin [mailto:clinton.begin@gmail.com]
Enviado el: lun 28/01/2008 18:36
Para: user-java@ibatis.apache.org
Asunto: RE: poor performance

Oh,

And TURN OFF debugging logging when you do your timings with iBATIS.  The
iBATIS java.sql.* logs are very slow (think method level interceptor that
writes to the console!) and are only intended for debugging purposes.

Clinton 

-----Original Message-----
From: Gerardo Corro Fuentes [mailto:gerardo.corro@mundivia.net]
Sent: January-28-08 10:26 AM
To: user-java@ibatis.apache.org
Subject: RE: poor performance

Hi,

I must download big portions of data, the queries that work properly do that
with no problems at all. Next I'm attaching a JDBC class that retrieves the
data in three seconds, and after that comes the logs that show how ibatis
takes more than two minutes to do the same.

Thanks a lot!!!

package test;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import org.apache.commons.dbcp.BasicDataSource;
import com.mundivia.flumen.db.common.FactoriaSpring;
public class QueryTest {
 public static void main(String args[]) throws SQLException{

 
  BasicDataSource ds = (BasicDataSource)
FactoriaSpring.getApplicationContext().getBean("dataSource");
  Connection con = ds.getConnection();
  Statement stmt = con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,
    ResultSet.CONCUR_READ_ONLY);
 
  long start = System.currentTimeMillis();
 
 
  ResultSet srs = stmt.executeQuery("SELECT distinct(guid_pm), fecha,
valor_h01, valor_h02, valor_h03, valor_h04, valor_h05, valor_h06, valor_h07,
" +
    "valor_h08, valor_h09, valor_h10, valor_h11, valor_h12, valor_h13,
valor_h14, valor_h15, valor_h16, valor_h17, " +
    "valor_h18, valor_h19, valor_h20, valor_h21, valor_h22, valor_h23,
valor_h24, valor_h25 " +
    "from FLUMEN.vw_puntos_medida_ve vwpm, flumen.variables_periodo vp,
flumen.periodovar p " +
    "where vwpm.id_ccaa = vp.id_sitio " +
    "and substr(vwpm.tarifa, 1, 1) = substr(vp.tarifa, 1, 1) " +
    "and vp.id_var = p.id_var " +
    "and p.fecha >= '20071001' " +
    "and p.fecha <= '20071031' " +
    "AND " +
    "                      ( " +
    "                       vwpm.f_desde_pf <=
to_date('20071001','yyyymmdd') " +
    "                       OR vwpm.f_desde_pf <=
to_date('20071031','yyyymmdd') " +
    "          )    " +                             
    "  AND ( " +
    "              vwpm.f_hasta_pf >= to_date('20071001','yyyymmdd') " +
    "              OR vwpm.f_hasta_pf >= to_date('20071031','yyyymmdd') " +
    "  ) " +
    "  AND ( " +
    "                       vwpm.f_desde_pm <=
to_date('20071001','yyyymmdd') " +
    "                       OR vwpm.f_desde_pm <=
to_date('20071031','yyyymmdd') " +
    "  ) " +
    "  AND ( " +
    "                      vwpm.f_hasta_pm >= to_date('20071001','yyyymmdd')
" +
    "                      OR vwpm.f_hasta_pm >=
to_date('20071031','yyyymmdd') " +
    "  ) " +
    "  AND ( " +
    "                       vwpm.f_desde_cpf <=
to_date('20071001','yyyymmdd') " +
    "                       OR vwpm.f_desde_cpf <=
to_date('20071031','yyyymmdd') " +
    "  ) " +
    " AND( " +
    "                       vwpm.f_hasta_cpf >=
to_date('20071001','yyyymmdd') " +
    "                       OR vwpm.f_hasta_cpf >=
to_date('20071031','yyyymmdd') " +
    " )" +
    "  AND  ( " +
    "                       vwpm.f_desde_apmpf <=
to_date('20071001','yyyymmdd') " +
    "                       OR vwpm.f_desde_apmpf <=
to_date('20071031','yyyymmdd') " +
    " ) " +
    "  AND ( " +
    "                       vwpm.f_hasta_apmpf >=
to_date('20071001','yyyymmdd') " +
    "                       OR vwpm.f_hasta_apmpf >=
to_date('20071031','yyyymmdd') " +
    "  ) " +
    "  AND ( " +
    "                       vwpm.f_desde_cpm <=
to_date('20071001','yyyymmdd') " +
    "                       OR vwpm.f_desde_cpm <=
to_date('20071031','yyyymmdd') " +
    "  ) " +
    "  AND ( " +
    "                       vwpm.f_hasta_cpm >=
to_date('20071001','yyyymmdd') " +
    "                       OR vwpm.f_hasta_cpm >=
to_date('20071031','yyyymmdd') " +
    "  ) " +
    "  AND ( " +
    "                       vwpm.f_desde_cpma <=
to_date('20071001','yyyymmdd') " +
    "                       OR vwpm.f_desde_cpma <=
to_date('20071031','yyyymmdd') " +
    "  ) " +
    "  AND ( " +
    "                       vwpm.f_hasta_cpma >=
to_date('20071001','yyyymmdd') " +
    "                       OR vwpm.f_hasta_cpma >=
to_date('20071031','yyyymmdd') " +
    " ) " +
    " AND ( " +
    "                       vwpm.f_desde_tc <=
to_date('20071001','yyyymmdd') " +
    "                       OR vwpm.f_desde_tc <=
to_date('20071031','yyyymmdd') " +
    "  ) " +
    "  AND ( " +
    "                       vwpm.f_hasta_tc >=
to_date('20071001','yyyymmdd') " +
    "                       OR vwpm.f_hasta_tc >=
to_date('20071031','yyyymmdd') " +
    "  ) " +
  " order by guid_pm, fecha ");
  while (srs.next()) {
   //System.out.print("\nObtengo pm: " + srs.getString(1));
  }
 
  System.out.print("Se tardó: " +  (System.currentTimeMillis()-start));
 }
}


The logs are:

[main] INFO - Loading XML bean definitions from class path resource
[applicationContext-dao.xml]

[main] INFO - Loading XML bean definitions from class path resource
[applicationContext-dao-transacciones.xml]

[main] INFO - Loading XML bean definitions from class path resource
[applicationContext-service.xml]

[main] INFO - Bean factory for application context
[org.springframework.context.support.ClassPathXmlApplicationContext;hashCode
=19475750]:
org.springframework.beans.factory.support.DefaultListableBeanFactory
defining beans
[sqlMapClientTemplate,Prelacion0DAOTarget,Prelacion1DAOTarget,Prelacion2DAOT
arget,Prelacion3DAOTarget,CalculoMVHDAOTarget,Prelacion4DAOTarget,Prelacion6
DAOTarget,Prelacion7DAOTarget,Prelacion8DAOTarget,AltaMVHDAOTarget,propertyC
onfigurer,sqlMapClient,dataSource,Prelacion0DAO,Prelacion1DAO,Prelacion2DAO,
Prelacion3DAO,Prelacion4DAO,Prelacion6DAO,Prelacion7DAO,Prelacion8DAO,Calcul
oMVHDAO,AltaMVHDAO,transactionManager,defaultTxAttributes,Prelacion0Servicio
Target,Prelacion1ServicioTarget,Prelacion2ServicioTarget,Prelacion3ServicioT
arget,CurvaHorariaServicioTarget,Prelacion4ServicioTarget,Prelacion6Servicio
Target,Prelacion7ServicioTarget,Prelacion8ServicioTarget,AltaMVHServicioTarg
et,Prelacion0Servicio,Prelacion1Servicio,Prelacion2Servicio,Prelacion3Servic
io,Prelacion4Servicio,Prelacion6Servicio,Prelacion7Servicio,Prelacion8Servic
io,AltaMVHServicio,CurvaHorariaServicio]; root of BeanFactory hierarchy

[main] INFO - 46 beans defined in application context
[org.springframework.context.support.ClassPathXmlApplicationContext;hashCode
=19475750]

[main] INFO - Creating shared instance of singleton bean
'propertyConfigurer'

[main] INFO - Loading properties from class path resource
[database.properties]

[main] INFO - JDK 1.4+ collections available

[main] INFO - Commons Collections 3.x available

[main] INFO - Unable to locate MessageSource with name 'messageSource':
using default
[org.springframework.context.support.DelegatingMessageSource@82764b]

[main] INFO - Unable to locate ApplicationEventMulticaster with name
'applicationEventMulticaster': using default
[org.springframework.context.event.SimpleApplicationEventMulticaster@1bf3d87
]

[main] INFO - Pre-instantiating singletons in factory
[org.springframework.beans.factory.support.DefaultListableBeanFactory
defining beans
[sqlMapClientTemplate,Prelacion0DAOTarget,Prelacion1DAOTarget,Prelacion2DAOT
arget,Prelacion3DAOTarget,CalculoMVHDAOTarget,Prelacion4DAOTarget,Prelacion6
DAOTarget,Prelacion7DAOTarget,Prelacion8DAOTarget,AltaMVHDAOTarget,propertyC
onfigurer,sqlMapClient,dataSource,Prelacion0DAO,Prelacion1DAO,Prelacion2DAO,
Prelacion3DAO,Prelacion4DAO,Prelacion6DAO,Prelacion7DAO,Prelacion8DAO,Calcul
oMVHDAO,AltaMVHDAO,transactionManager,defaultTxAttributes,Prelacion0Servicio
Target,Prelacion1ServicioTarget,Prelacion2ServicioTarget,Prelacion3ServicioT
arget,CurvaHorariaServicioTarget,Prelacion4ServicioTarget,Prelacion6Servicio
Target,Prelacion7ServicioTarget,Prelacion8ServicioTarget,AltaMVHServicioTarg
et,Prelacion0Servicio,Prelacion1Servicio,Prelacion2Servicio,Prelacion3Servic
io,Prelacion4Servicio,Prelacion6Servicio,Prelacion7Servicio,Prelacion8Servic
io,AltaMVHServicio,CurvaHorariaServicio]; root of BeanFactory hierarchy]

[main] INFO - Creating shared instance of singleton bean
'sqlMapClientTemplate'

[main] INFO - Creating shared instance of singleton bean 'sqlMapClient'

[main] INFO - Creating shared instance of singleton bean 'dataSource'

[main] INFO - Creating shared instance of singleton bean
'Prelacion0DAOTarget'

[main] INFO - Creating shared instance of singleton bean
'Prelacion1DAOTarget'

[main] INFO - Creating shared instance of singleton bean
'Prelacion2DAOTarget'

[main] INFO - Creating shared instance of singleton bean
'Prelacion3DAOTarget'

[main] INFO - Creating shared instance of singleton bean
'CalculoMVHDAOTarget'

[main] INFO - Creating shared instance of singleton bean
'Prelacion4DAOTarget'

[main] INFO - Creating shared instance of singleton bean
'Prelacion6DAOTarget'

[main] INFO - Creating shared instance of singleton bean
'Prelacion7DAOTarget'

[main] INFO - Creating shared instance of singleton bean
'Prelacion8DAOTarget'

[main] INFO - Creating shared instance of singleton bean 'AltaMVHDAOTarget'

[main] INFO - Creating shared instance of singleton bean 'Prelacion0DAO'

[main] INFO - CGLIB2 not available: proxyTargetClass feature disabled

[main] INFO - Creating shared instance of singleton bean
'transactionManager'

[main] INFO - Creating shared instance of singleton bean
'defaultTxAttributes'

[main] INFO - Creating shared instance of singleton bean 'Prelacion1DAO'

[main] INFO - Creating shared instance of singleton bean 'Prelacion2DAO'

[main] INFO - Creating shared instance of singleton bean 'Prelacion3DAO'

[main] INFO - Creating shared instance of singleton bean 'Prelacion4DAO'

[main] INFO - Creating shared instance of singleton bean 'Prelacion6DAO'

[main] INFO - Creating shared instance of singleton bean 'Prelacion7DAO'

[main] INFO - Creating shared instance of singleton bean 'Prelacion8DAO'

[main] INFO - Creating shared instance of singleton bean 'CalculoMVHDAO'

[main] INFO - Creating shared instance of singleton bean 'AltaMVHDAO'

[main] INFO - Creating shared instance of singleton bean
'Prelacion0Servicio'

[main] INFO - Creating shared instance of singleton bean
'Prelacion1Servicio'

[main] INFO - Creating shared instance of singleton bean
'Prelacion2Servicio'

[main] INFO - Creating shared instance of singleton bean
'Prelacion3Servicio'

[main] INFO - Creating shared instance of singleton bean
'Prelacion4Servicio'

[main] INFO - Creating shared instance of singleton bean
'Prelacion6Servicio'

[main] INFO - Creating shared instance of singleton bean
'Prelacion7Servicio'

[main] INFO - Creating shared instance of singleton bean
'Prelacion8Servicio'

[main] INFO - Creating shared instance of singleton bean 'AltaMVHServicio'

[main] INFO - Creating shared instance of singleton bean
'CurvaHorariaServicio'

[main] INFO - JDBC 3.0 Savepoint class is available

[main] DEBUG - Using transaction object
[org.springframework.jdbc.datasource.DataSourceTransactionManager$DataSource
TransactionObject@187c55c]

[main] INFO - Prelacion1ServicioImpl:buscarPrelacion0 ...se van a buscar los
datos para prelacion 0

[main] DEBUG - Using transaction object
[org.springframework.jdbc.datasource.DataSourceTransactionManager$DataSource
TransactionObject@b02928]

[main] DEBUG - Executing action directly on SqlMapClient

[main] DEBUG - Opening JDBC Connection

[main] DEBUG - Registering transaction synchronization for JDBC Connection

[main] DEBUG - {conn-100000} Connection

[main] DEBUG - {conn-100000} Preparing Statement: select distinct(guid_pm)
from FLUMEN.vw_puntos_medida_ve vwpm WHERE ( vwpm.f_desde_pf <=
to_date(?,'yyyymmdd') OR vwpm.f_desde_pf <= to_date(?,'yyyymmdd') ) AND (
vwpm.f_hasta_pf >= to_date(?,'yyyymmdd') OR vwpm.f_hasta_pf >=
to_date(?,'yyyymmdd') ) AND ( vwpm.f_desde_pm <= to_date(?,'yyyymmdd') OR
vwpm.f_desde_pm <= to_date(?,'yyyymmdd') ) AND ( vwpm.f_hasta_pm >=
to_date(?,'yyyymmdd') OR vwpm.f_hasta_pm >= to_date(?,'yyyymmdd') ) AND (
vwpm.f_desde_cpf <= to_date(?,'yyyymmdd') OR vwpm.f_desde_cpf <=
to_date(?,'yyyymmdd') ) AND( vwpm.f_hasta_cpf >= to_date(?,'yyyymmdd') OR
vwpm.f_hasta_cpf >= to_date(?,'yyyymmdd') ) AND ( vwpm.f_desde_apmpf <=
to_date(?,'yyyymmdd') OR vwpm.f_desde_apmpf <= to_date(?,'yyyymmdd') ) AND (
vwpm.f_hasta_apmpf >= to_date(?,'yyyymmdd') OR vwpm.f_hasta_apmpf >=
to_date(?,'yyyymmdd') ) AND ( vwpm.f_desde_cpm <= to_date(?,'yyyymmdd') OR
vwpm.f_desde_cpm <= to_date(?,'yyyymmdd') ) AND ( vwpm.f_hasta_cpm >=
to_date(?,'yyyymmdd') OR vwpm.f_hasta_cpm >= to_date(?,'yyyymmdd') ) AND (
vwpm.f_desde_cpma <= to_date(?,'yyyymmdd') OR vwpm.f_desde_cpma <=
to_date(?,'yyyymmdd') ) AND ( vwpm.f_hasta_cpma >= to_date(?,'yyyymmdd') OR
vwpm.f_hasta_cpma >= to_date(?,'yyyymmdd') ) AND ( vwpm.f_desde_tc <=
to_date(?,'yyyymmdd') OR vwpm.f_desde_tc <= to_date(?,'yyyymmdd') ) AND (
vwpm.f_hasta_tc >= to_date(?,'yyyymmdd') OR vwpm.f_hasta_tc >=
to_date(?,'yyyymmdd') )

[main] DEBUG - {pstm-100001} Executing Statement: select distinct(guid_pm)
from FLUMEN.vw_puntos_medida_ve vwpm WHERE ( vwpm.f_desde_pf <=
to_date(?,'yyyymmdd') OR vwpm.f_desde_pf <= to_date(?,'yyyymmdd') ) AND (
vwpm.f_hasta_pf >= to_date(?,'yyyymmdd') OR vwpm.f_hasta_pf >=
to_date(?,'yyyymmdd') ) AND ( vwpm.f_desde_pm <= to_date(?,'yyyymmdd') OR
vwpm.f_desde_pm <= to_date(?,'yyyymmdd') ) AND ( vwpm.f_hasta_pm >=
to_date(?,'yyyymmdd') OR vwpm.f_hasta_pm >= to_date(?,'yyyymmdd') ) AND (
vwpm.f_desde_cpf <= to_date(?,'yyyymmdd') OR vwpm.f_desde_cpf <=
to_date(?,'yyyymmdd') ) AND( vwpm.f_hasta_cpf >= to_date(?,'yyyymmdd') OR
vwpm.f_hasta_cpf >= to_date(?,'yyyymmdd') ) AND ( vwpm.f_desde_apmpf <=
to_date(?,'yyyymmdd') OR vwpm.f_desde_apmpf <= to_date(?,'yyyymmdd') ) AND (
vwpm.f_hasta_apmpf >= to_date(?,'yyyymmdd') OR vwpm.f_hasta_apmpf >=
to_date(?,'yyyymmdd') ) AND ( vwpm.f_desde_cpm <= to_date(?,'yyyymmdd') OR
vwpm.f_desde_cpm <= to_date(?,'yyyymmdd') ) AND ( vwpm.f_hasta_cpm >=
to_date(?,'yyyymmdd') OR vwpm.f_hasta_cpm >= to_date(?,'yyyymmdd') ) AND (
vwpm.f_desde_cpma <= to_date(?,'yyyymmdd') OR vwpm.f_desde_cpma <=
to_date(?,'yyyymmdd') ) AND ( vwpm.f_hasta_cpma >= to_date(?,'yyyymmdd') OR
vwpm.f_hasta_cpma >= to_date(?,'yyyymmdd') ) AND ( vwpm.f_desde_tc <=
to_date(?,'yyyymmdd') OR vwpm.f_desde_tc <= to_date(?,'yyyymmdd') ) AND (
vwpm.f_hasta_tc >= to_date(?,'yyyymmdd') OR vwpm.f_hasta_tc >=
to_date(?,'yyyymmdd') )

[main] DEBUG - {pstm-100001} Parameters: [20071001, 20071030, 20071001,
20071030, 20071001, 20071030, 20071001, 20071030, 20071001, 20071030,
20071001, 20071030, 20071001, 20071030, 20071001, 20071030, 20071001,
20071030, 20071001, 20071030, 20071001, 20071030, 20071001, 20071030,
20071001, 20071030, 20071001, 20071030]

[main] DEBUG - {pstm-100001} Types: [java.lang.String, java.lang.String,
java.lang.String, java.lang.String, java.lang.String, java.lang.String,
java.lang.String, java.lang.String, java.lang.String, java.lang.String,
java.lang.String, java.lang.String, java.lang.String, java.lang.String,
java.lang.String, java.lang.String, java.lang.String, java.lang.String,
java.lang.String, java.lang.String, java.lang.String, java.lang.String,
java.lang.String, java.lang.String, java.lang.String, java.lang.String,
java.lang.String, java.lang.String]

[main] DEBUG - {rset-100002} ResultSet

[main] DEBUG - {rset-100002} Header: [GUID_PM]

[main] DEBUG - {rset-100002} Result: [7322]

[main] DEBUG - {rset-100002} Result: [7305]

[main] DEBUG - {rset-100002} Result: [1270102]

[main] DEBUG - {rset-100002} Result: [7298]

[main] DEBUG - {rset-100002} Result: [1284195]

[main] DEBUG - {rset-100002} Result: [1285724]

[main] DEBUG - {rset-100002} Result: [7539]

[main] DEBUG - {rset-100002} Result: [1309723]

[main] DEBUG - {rset-100002} Result: [1285091]

[main] DEBUG - {rset-100002} Result: [1323673]

[main] DEBUG - {rset-100002} Result: [1284043]

[main] DEBUG - {rset-100002} Result: [1283520]

[main] DEBUG - {rset-100002} Result: [38286]

[main] DEBUG - {rset-100002} Result: [1297556]

[main] DEBUG - {rset-100002} Result: [7542]

[main] DEBUG - {rset-100002} Result: [49352]

[main] DEBUG - {rset-100002} Result: [1305525]

[main] DEBUG - {rset-100002} Result: [1317347]

[main] DEBUG - {rset-100002} Result: [1297637]

[main] DEBUG - {rset-100002} Result: [1314151]

[main] DEBUG - {rset-100002} Result: [1324687]

[main] DEBUG - {rset-100002} Result: [1297583]

[main] DEBUG - {rset-100002} Result: [1297565]

[main] DEBUG - {rset-100002} Result: [1270186]

[main] DEBUG - {rset-100002} Result: [7300]

[main] DEBUG - {rset-100002} Result: [7294]

[main] DEBUG - {rset-100002} Result: [1314597]

[main] DEBUG - {rset-100002} Result: [1297855]

[main] DEBUG - {rset-100002} Result: [1314514]

[main] DEBUG - {rset-100002} Result: [1297619]

[main] DEBUG - {rset-100002} Result: [1305437]

[main] DEBUG - {rset-100002} Result: [1297437]

[main] DEBUG - {rset-100002} Result: [54124]

[main] DEBUG - {rset-100002} Result: [1306645]

[main] DEBUG - {rset-100002} Result: [1184876]

[main] DEBUG - {rset-100002} Result: [57808]

[main] DEBUG - {rset-100002} Result: [7471]

[main] DEBUG - {rset-100002} Result: [7520]

[main] DEBUG - {rset-100002} Result: [1322275]

[main] DEBUG - {rset-100002} Result: [1312879]

[main] DEBUG - {rset-100002} Result: [1312870]

[main] DEBUG - {rset-100002} Result: [1297497]

[main] DEBUG - {rset-100002} Result: [1297574]

[main] DEBUG - {rset-100002} Result: [1287044]

[main] DEBUG - {rset-100002} Result: [1314133]

[main] DEBUG - {rset-100002} Result: [1309732]

[main] DEBUG - {rset-100002} Result: [1314169]

[main] DEBUG - {rset-100002} Result: [58574]

[main] DEBUG - {rset-100002} Result: [1285781]

[main] DEBUG - {rset-100002} Result: [1297646]

[main] DEBUG - {rset-100002} Result: [7519]

[main] DEBUG - {rset-100002} Result: [1198695]

[main] DEBUG - {rset-100002} Result: [1306636]

[main] DEBUG - {rset-100002} Result: [48449]

[main] DEBUG - {rset-100002} Result: [1297628]

[main] DEBUG - {rset-100002} Result: [7522]

[main] DEBUG - {rset-100002} Result: [48738]

[main] DEBUG - {rset-100002} Result: [1270084]

[main] DEBUG - {rset-100002} Result: [1297419]

[main] DEBUG - {rset-100002} Result: [1314615]

[main] DEBUG - {rset-100002} Result: [1314606]

[main] DEBUG - {rset-100002} Result: [1313946]

[main] DEBUG - {rset-100002} Result: [1331045]

[main] DEBUG - {rset-100002} Result: [7469]

[main] DEBUG - {rset-100002} Result: [7283]

[main] DEBUG - {rset-100002} Result: [1297713]

[main] DEBUG - {rset-100002} Result: [1314550]

[main] DEBUG - {rset-100002} Result: [1324705]

[main] DEBUG - {rset-100002} Result: [1324669]

[main] DEBUG - {rset-100002} Result: [58584]

[main] DEBUG - {rset-100002} Result: [1305265]

[main] DEBUG - {rset-100002} Result: [1297683]

[main] DEBUG - {rset-100002} Result: [1312915]

[main] DEBUG - {rset-100002} Result: [1314142]

[main] DEBUG - {rset-100002} Result: [1297704]

[main] DEBUG - {rset-100002} Result: [1298358]

[main] DEBUG - {rset-100002} Result: [1297488]

[main] DEBUG - {rset-100002} Result: [1314541]

[main] DEBUG - {rset-100002} Result: [1324678]

[main] DEBUG - {rset-100002} Result: [57836]

[main] DEBUG - {rset-100002} Result: [57843]

[main] DEBUG - {rset-100002} Result: [1283553]

[main] DEBUG - {rset-100002} Result: [1286950]

[main] DEBUG - {rset-100002} Result: [7326]

[main] DEBUG - {rset-100002} Result: [7308]

[main] DEBUG - {rset-100002} Result: [1283436]

[main] DEBUG - {rset-100002} Result: [1285149]

[main] DEBUG - {rset-100002} Result: [1324273]

[main] DEBUG - {rset-100002} Result: [1285837]

[main] DEBUG - {rset-100002} Result: [1305880]

[main] DEBUG - {rset-100002} Result: [1204464]

[main] DEBUG - {rset-100002} Result: [7521]

[main] DEBUG - {rset-100002} Result: [7285]

[main] DEBUG - {rset-100002} Result: [1314523]

[main] DEBUG - {rset-100002} Result: [1314160]

[main] DEBUG - {rset-100002} Result: [1306244]

[main] DEBUG - {rset-100002} Result: [1296858]

[main] DEBUG - {rset-100002} Result: [48429]

[main] DEBUG - {rset-100002} Result: [1306169]

[main] DEBUG - {rset-100002} Result: [1285695]

[main] DEBUG - {rset-100002} Result: [1305274]

[main] DEBUG - {rset-100002} Result: [1306474]

[main] DEBUG - {rset-100002} Result: [6889]

[main] DEBUG - {rset-100002} Result: [1319257]

[main] DEBUG - {rset-100002} Result: [1324696]

[main] DEBUG - {rset-100002} Result: [7320]

[main] DEBUG - {rset-100002} Result: [1297524]

[main] DEBUG - {rset-100002} Result: [1270156]

[main] DEBUG - {rset-100002} Result: [7553]

[main] DEBUG - {rset-100002} Result: [1305552]

[main] DEBUG - {rset-100002} Result: [6877]

[main] DEBUG - {rset-100002} Result: [1195746]

[main] DEBUG - {rset-100002} Result: [26265]

[main] DEBUG - {rset-100002} Result: [1314178]

[main] DEBUG - {rset-100002} Result: [1314851]

[main] DEBUG - {rset-100002} Result: [1312906]

[main] DEBUG - {rset-100002} Result: [54089]

[main] DEBUG - {rset-100002} Result: [6871]

[main] DEBUG - {rset-100002} Result: [48388]

[main] DEBUG - {rset-100002} Result: [1324723]

[main] DEBUG - {rset-100002} Result: [1312897]

[main] DEBUG - {rset-100002} Result: [1285503]

[main] DEBUG - {rset-100002} Result: [1314633]

[main] DEBUG - {rset-100002} Result: [1306160]

[main] DEBUG - {rset-100002} Result: [1198656]

[main] DEBUG - {rset-100002} Result: [1297695]

[main] DEBUG - {rset-100002} Result: [7307]

[main] DEBUG - {rset-100002} Result: [1285850]

[main] DEBUG - {rset-100002} Result: [1198704]

[main] DEBUG - {rset-100002} Result: [1312888]

[main] DEBUG - {rset-100002} Result: [1296918]

[main] DEBUG - {rset-100002} Result: [1305534]

[main] DEBUG - {rset-100002} Result: [1312993]

[main] DEBUG - {rset-100002} Result: [1285533]

[main] DEBUG - {rset-100002} Result: [1270138]

[main] DEBUG - {rset-100002} Result: [1319282]

[main] DEBUG - {rset-100002} Result: [7290]

[main] DEBUG - {rset-100002} Result: [7289]

[main] DEBUG - {rset-100002} Result: [38291]

[main] DEBUG - {rset-100002} Result: [7541]

[main] DEBUG - {rset-100002} Result: [7287]

[main] DEBUG - {rset-100002} Result: [7284]

[main] DEBUG - {rset-100002} Result: [1297610]

[main] DEBUG - {rset-100002} Result: [1314532]

[main] DEBUG - {rset-100002} Result: [6981]

[main] DEBUG - {rset-100002} Result: [1324714]

[main] DEBUG - {rset-100002} Result: [1305650]

[main] DEBUG - {rset-100002} Result: [1312933]

[main] DEBUG - {rset-100002} Result: [48439]

[main] DEBUG - {rset-100002} Result: [1022538]

[main] DEBUG - {rset-100002} Result: [1285512]

[main] DEBUG - {rset-100002} Result: [1024146]

[main] DEBUG - {rset-100002} Result: [1024231]

[main] DEBUG - {rset-100002} Result: [1306483]

[main] DEBUG - {rset-100002} Result: [1285521]

[main] DEBUG - {rset-100002} Result: [1285862]

[main] DEBUG - {rset-100002} Result: [7327]

[main] DEBUG - {rset-100002} Result: [7301]

[main] DEBUG - {rset-100002} Result: [45626]

[main] DEBUG - {rset-100002} Result: [1314496]

[main] DEBUG - {rset-100002} Result: [1306253]

[main] DEBUG - {rset-100002} Result: [1285661]

[main] DEBUG - {rset-100002} Result: [1297601]

[main] DEBUG - {rset-100002} Result: [1314505]

[main] DEBUG - {rset-100002} Result: [1309714]

[main] DEBUG - {rset-100002} Result: [1305871]

[main] DEBUG - {rset-100002} Result: [1283382]

[main] DEBUG - {rset-100002} Result: [1324282]

[main] DEBUG - {rset-100002} Result: [1283403]

[main] DEBUG - {rset-100002} Result: [7288]

[main] DEBUG - {rset-100002} Result: [1284896]

[main] DEBUG - {rset-100002} Result: [1305862]

[main] DEBUG - {rset-100002} Result: [1312924]

[main] DEBUG - {rset-100002} Result: [1313005]

[main] DEBUG - {rset-100002} Result: [1198679]

[main] DEBUG - {rset-100002} Result: [1317239]

[main] DEBUG - {rset-100002} Result: [45565]

[main] DEBUG - {rset-100002} Result: [1296867]

[main] DEBUG - {rset-100002} Result: [49382]

[main] DEBUG - {rset-100002} Result: [1324264]

[main] DEBUG - {rset-100002} Result: [1294962]

[main] DEBUG - {rset-100002} Result: [1317338]

[main] DEBUG - {rset-100002} Result: [1314624]

[main] DEBUG - {rset-100002} Result: [38296]

[main] DEBUG - {rset-100002} Result: [7306]

[main] DEBUG - {rset-100002} Result: [1270120]

[main] DEBUG - {rset-100002} Result: [1321174]

[main] DEBUG - {rset-100002} Result: [1270198]

[main] DEBUG - {rset-100002} Result: [1283364]

[main] DEBUG - {rset-100002} Result: [7316]

[main] DEBUG - {rset-100002} Result: [7302]

[main] DEBUG - {rset-100002} Result: [7295]

[main] DEBUG - {rset-100002} Result: [6876]

[main] DEBUG - {rset-100002} Result: [26260]

[main] DEBUG - {rset-100002} Result: [1297674]

[main] DEBUG - {rset-100002} Result: [1196863]

[main] DEBUG - {rset-100002} Result: [1314735]

[main] DEBUG - {rset-100002} Result: [1285736]

[main] DEBUG - {rset-100002} Result: [1297428]

[main] DEBUG - {rset-100002} Result: [1195730]

[main] DEBUG - {rset-100002} Result: [1297365]

[main] DEBUG - {rset-100002} Result: [1293213]

[main] DEBUG - {rset-100002} Result: [1324294]

[main] DEBUG - {rset-100002} Result: [1324255]

[main] DEBUG - {rset-100002} Result: [1297547]

[main] DEBUG - {rset-100002} Result: [1305453]

[main] DEBUG - {rset-100002} Result: [7540]

[main] DEBUG - {rset-100002} Result: [1285359]

[main] DEBUG - {rset-100002} Result: [1283583]

[main] DEBUG - {rset-100002} Result: [1305543]

[main] DEBUG - {rset-100002} Result: [1297506]

[main] DEBUG - {rset-100002} Result: [1297592]

[main] DEBUG - {rset-100002} Result: [1022555]

[main] DEBUG - {rset-100002} Result: [58564]

[main] DEBUG - {rset-100002} Result: [1284878]

[main] DEBUG - {rset-100002} Result: [1306151]

[main] DEBUG - Triggering beforeCommit synchronization

[main] DEBUG - Triggering beforeCompletion synchronization

[main] DEBUG - Closing JDBC Connection

[main] DEBUG - Triggering afterCompletion synchronization

[main] DEBUG - Using transaction object
[org.springframework.jdbc.datasource.DataSourceTransactionManager$DataSource
TransactionObject@221e9e]

[main] INFO - Prelacion1ServicioImpl:buscarPrelacion0 ...se van a buscar los
datos para prelacion 0

[main] DEBUG - Using transaction object
[org.springframework.jdbc.datasource.DataSourceTransactionManager$DataSource
TransactionObject@1264eab]

[main] DEBUG - Executing action directly on SqlMapClient

[main] DEBUG - Opening JDBC Connection

[main] DEBUG - Registering transaction synchronization for JDBC Connection

[main] DEBUG - {conn-100003} Connection

[main] DEBUG - {conn-100003} Preparing Statement: SELECT distinct(guid_pm),
fecha, valor_h01, valor_h02, valor_h03, valor_h04, valor_h05, valor_h06,
valor_h07, valor_h08, valor_h09, valor_h10, valor_h11, valor_h12, valor_h13,
valor_h14, valor_h15, valor_h16, valor_h17, valor_h18, valor_h19, valor_h20,
valor_h21, valor_h22, valor_h23, valor_h24, valor_h25 from
FLUMEN.vw_puntos_medida_ve vwpm, flumen.variables_periodo vp,
flumen.periodovar p where vwpm.id_ccaa = vp.id_sitio and substr(vwpm.tarifa,
1, 1) = substr(vp.tarifa, 1, 1) and vp.id_var = p.id_var and p.fecha >= ?
and p.fecha <= ? AND ( vwpm.f_desde_pf <= to_date(?,'yyyymmdd') OR
vwpm.f_desde_pf <= to_date(?,'yyyymmdd') ) AND ( vwpm.f_hasta_pf >=
to_date(?,'yyyymmdd') OR vwpm.f_hasta_pf >= to_date(?,'yyyymmdd') ) AND (
vwpm.f_desde_pm <= to_date(?,'yyyymmdd') OR vwpm.f_desde_pm <=
to_date(?,'yyyymmdd') ) AND ( vwpm.f_hasta_pm >= to_date(?,'yyyymmdd') OR
vwpm.f_hasta_pm >= to_date(?,'yyyymmdd') ) AND ( vwpm.f_desde_cpf <=
to_date(?,'yyyymmdd') OR vwpm.f_desde_cpf <= to_date(?,'yyyymmdd') ) AND(
vwpm.f_hasta_cpf >= to_date(?,'yyyymmdd') OR vwpm.f_hasta_cpf >=
to_date(?,'yyyymmdd') ) AND ( vwpm.f_desde_apmpf <= to_date(?,'yyyymmdd') OR
vwpm.f_desde_apmpf <= to_date(?,'yyyymmdd') ) AND ( vwpm.f_hasta_apmpf >=
to_date(?,'yyyymmdd') OR vwpm.f_hasta_apmpf >= to_date(?,'yyyymmdd') ) AND (
vwpm.f_desde_cpm <= to_date(?,'yyyymmdd') OR vwpm.f_desde_cpm <=
to_date(?,'yyyymmdd') ) AND ( vwpm.f_hasta_cpm >= to_date(?,'yyyymmdd') OR
vwpm.f_hasta_cpm >= to_date(?,'yyyymmdd') ) AND ( vwpm.f_desde_cpma <=
to_date(?,'yyyymmdd') OR vwpm.f_desde_cpma <= to_date(?,'yyyymmdd') ) AND (
vwpm.f_hasta_cpma >= to_date(?,'yyyymmdd') OR vwpm.f_hasta_cpma >=
to_date(?,'yyyymmdd') ) AND ( vwpm.f_desde_tc <= to_date(?,'yyyymmdd') OR
vwpm.f_desde_tc <= to_date(?,'yyyymmdd') ) AND ( vwpm.f_hasta_tc >=
to_date(?,'yyyymmdd') OR vwpm.f_hasta_tc >= to_date(?,'yyyymmdd') ) order by
guid_pm, fecha

[main] DEBUG - {pstm-100004} Executing Statement: SELECT distinct(guid_pm),
fecha, valor_h01, valor_h02, valor_h03, valor_h04, valor_h05, valor_h06,
valor_h07, valor_h08, valor_h09, valor_h10, valor_h11, valor_h12, valor_h13,
valor_h14, valor_h15, valor_h16, valor_h17, valor_h18, valor_h19, valor_h20,
valor_h21, valor_h22, valor_h23, valor_h24, valor_h25 from
FLUMEN.vw_puntos_medida_ve vwpm, flumen.variables_periodo vp,
flumen.periodovar p where vwpm.id_ccaa = vp.id_sitio and substr(vwpm.tarifa,
1, 1) = substr(vp.tarifa, 1, 1) and vp.id_var = p.id_var and p.fecha >= ?
and p.fecha <= ? AND ( vwpm.f_desde_pf <= to_date(?,'yyyymmdd') OR
vwpm.f_desde_pf <= to_date(?,'yyyymmdd') ) AND ( vwpm.f_hasta_pf >=
to_date(?,'yyyymmdd') OR vwpm.f_hasta_pf >= to_date(?,'yyyymmdd') ) AND (
vwpm.f_desde_pm <= to_date(?,'yyyymmdd') OR vwpm.f_desde_pm <=
to_date(?,'yyyymmdd') ) AND ( vwpm.f_hasta_pm >= to_date(?,'yyyymmdd') OR
vwpm.f_hasta_pm >= to_date(?,'yyyymmdd') ) AND ( vwpm.f_desde_cpf <=
to_date(?,'yyyymmdd') OR vwpm.f_desde_cpf <= to_date(?,'yyyymmdd') ) AND(
vwpm.f_hasta_cpf >= to_date(?,'yyyymmdd') OR vwpm.f_hasta_cpf >=
to_date(?,'yyyymmdd') ) AND ( vwpm.f_desde_apmpf <= to_date(?,'yyyymmdd') OR
vwpm.f_desde_apmpf <= to_date(?,'yyyymmdd') ) AND ( vwpm.f_hasta_apmpf >=
to_date(?,'yyyymmdd') OR vwpm.f_hasta_apmpf >= to_date(?,'yyyymmdd') ) AND (
vwpm.f_desde_cpm <= to_date(?,'yyyymmdd') OR vwpm.f_desde_cpm <=
to_date(?,'yyyymmdd') ) AND ( vwpm.f_hasta_cpm >= to_date(?,'yyyymmdd') OR
vwpm.f_hasta_cpm >= to_date(?,'yyyymmdd') ) AND ( vwpm.f_desde_cpma <=
to_date(?,'yyyymmdd') OR vwpm.f_desde_cpma <= to_date(?,'yyyymmdd') ) AND (
vwpm.f_hasta_cpma >= to_date(?,'yyyymmdd') OR vwpm.f_hasta_cpma >=
to_date(?,'yyyymmdd') ) AND ( vwpm.f_desde_tc <= to_date(?,'yyyymmdd') OR
vwpm.f_desde_tc <= to_date(?,'yyyymmdd') ) AND ( vwpm.f_hasta_tc >=
to_date(?,'yyyymmdd') OR vwpm.f_hasta_tc >= to_date(?,'yyyymmdd') ) order by
guid_pm, fecha

[main] DEBUG - {pstm-100004} Parameters: [20071001, 20071030, 20071001,
20071030, 20071001, 20071030, 20071001, 20071030, 20071001, 20071030,
20071001, 20071030, 20071001, 20071030, 20071001, 20071030, 20071001,
20071030, 20071001, 20071030, 20071001, 20071030, 20071001, 20071030,
20071001, 20071030, 20071001, 20071030, 20071001, 20071030]

[main] DEBUG - {pstm-100004} Types: [java.lang.String, java.lang.String,
java.lang.String, java.lang.String, java.lang.String, java.lang.String,
java.lang.String, java.lang.String, java.lang.String, java.lang.String,
java.lang.String, java.lang.String, java.lang.String, java.lang.String,
java.lang.String, java.lang.String, java.lang.String, java.lang.String,
java.lang.String, java.lang.String, java.lang.String, java.lang.String,
java.lang.String, java.lang.String, java.lang.String, java.lang.String,
java.lang.String, java.lang.String, java.lang.String, java.lang.String]

[main] DEBUG - {rset-100005} ResultSet

[main] DEBUG - {rset-100005} Header: [guid_pm, fecha, valor_h01, valor_h02,
valor_h03, valor_h04, valor_h05, valor_h06, valor_h07, valor_h08, valor_h09,
valor_h10, valor_h11, valor_h12, valor_h13, valor_h14, valor_h15, valor_h16,
valor_h17, valor_h18, valor_h19, valor_h20, valor_h21, valor_h22, valor_h23,
valor_h24, valor_h25]

[main] DEBUG - {rset-100005} Result: [6871, 20071001, 6, 6, 6, 6, 6, 6, 6,
6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 5, 5, 5, 5, null]

[main] DEBUG - {rset-100005} Result: [6871, 20071002, 6, 6, 6, 6, 6, 6, 6,
6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 5, 5, 5, 5, null]

[main] DEBUG - {rset-100005} Result: [6871, 20071003, 6, 6, 6, 6, 6, 6, 6,
6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 5, 5, 5, 5, null]



... many more rows here....



[main] DEBUG - {rset-100005} Result: [1331045, 20071027, 6, 6, 6, 6, 6, 6,
6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, null]

[main] DEBUG - {rset-100005} Result: [1331045, 20071028, 6, 6, 6, 6, 6, 6,
6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, null]

[main] DEBUG - {rset-100005} Result: [1331045, 20071029, 6, 6, 6, 6, 6, 6,
6, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 5, 5, 5, 5, null]

[main] DEBUG - {rset-100005} Result: [1331045, 20071030, 6, 6, 6, 6, 6, 6,
6, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 5, 5, 5, 5, null]

[main] DEBUG - Triggering beforeCommit synchronization

[main] DEBUG - Triggering beforeCompletion synchronization

[main] DEBUG - Closing JDBC Connection

[main] DEBUG - Triggering afterCompletion synchronization

[main] INFO - All data was retrieved in: 148278ms


________________________________

De: Randall Svancara [mailto:rsvancara@wsu.edu]
Enviado el: lun 28/01/2008 18:05
Para: user-java@ibatis.apache.org
Asunto: Re: poor performance



Turn on debugging and send the output.  Also send the queries if you can
so that we know what you are trying to query within reason of course.

Also make sure you are querying the same database as you are querying in
with your jdbc driver.  Also make sure you are using query properly,
hitting the indexes and such.

Also, if you are returning back large record sets, consider returning
back smaller record sets, and if you can't, try using paginated results.

I know this some of this seems rudimentary, but let's get rid of the
obvious problems first.

-
Randall Svancara


On Mon, 2008-01-28 at 17:56 +0100, Gerardo Corro Fuentes wrote:
> Hi,
>
> I built a DAO with IBatis 2.2.0. Most of this DAO works properly,
> however thre are a couple of queries that are very slow, it takes 2
> minutes for them to be completed while a plain JDBC querie takes only
> three seconds.
>
> I verified the slow quieries many times, and they actually look very
> similar to others that run very fast.
>
> I also Spring 1.2; commons DBCP 1.4.
>
> Thanks!!!
>
>
>
> The ibatis config file looks like:
>
> <settings
>
> cacheModelsEnabled="false"
>
> enhancementEnabled="true"
>
> maxSessions="64"
>
> maxTransactions="8"
>
> maxRequests="128"
>
> useStatementNamespaces="true"/>
>
>
>
>
>
>
>
>
>
>
>
> <?sml version="1.0" encoding="UTF-8" ?>
>
> <!DOCTYPE sqlMap
>
> PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN"
>
> "http://www.ibatis.com/dtd/sql-map-2.dtd">
>
> <sqlMap namespace="CurvaHoraria">
>
> <typeAlias alias="curvaHoraria" type="com.db.dto.DTO1"/>
>
> <resultMap id="curvaHorariaResult" class="curvaHoraria">
>
> <result property="guidPm" column="guid_pm"/>
>
> <result property="fecha" column="fecha"/>
>
> <result property="periodo1" column="valor_h01"/>
>
> <result property="periodo2" column="valor_h02"/>
>
> <result property="periodo3" column="valor_h03"/>
>
> <result property="periodo4" column="valor_h04"/>
>
> <result property="periodo5" column="valor_h05"/>
>
> <result property="periodo6" column="valor_h06"/>
>
> <result property="periodo7" column="valor_h07"/>
>
> <result property="periodo8" column="valor_h08"/>
>
> <result property="periodo9" column="valor_h09"/>
>
> <result property="periodo10" column="valor_h10"/>
>
> <result property="periodo11" column="valor_h11"/>
>
> <result property="periodo12" column="valor_h12"/>
>
> <result property="periodo13" column="valor_h13"/>
>
> <result property="periodo14" column="valor_h14"/>
>
> <result property="periodo15" column="valor_h15"/>
>
> <result property="periodo16" column="valor_h16"/>
>
> <result property="periodo17" column="valor_h17"/>
>
> <result property="periodo18" column="valor_h18"/>
>
> <result property="periodo19" column="valor_h19"/>
>
> <result property="periodo20" column="valor_h20"/>
>
> <result property="periodo21" column="valor_h21"/>
>
> <result property="periodo22" column="valor_h22"/>
>
> <result property="periodo23" column="valor_h23"/>
>
> <result property="periodo24" column="valor_h24"/>
>
> <result property="periodo25" column="valor_h25"/>
>
> </resultMap>
>
> <sql id="fragmento_fechas">
>
> (
>
> vwpm.f_desde_pf <![CDATA[<=]]> to_date(#fecha_desde#,'yyyymmdd')
>
> OR vwpm.f_desde_pf <![CDATA[<=]]> to_date(#fecha_hasta#,'yyyymmdd')
>
> )
>
> AND (
>
> vwpm.f_hasta_pf <![CDATA[>=]]> to_date(#fecha_desde#,'yyyymmdd')
>
> OR vwpm.f_hasta_pf <![CDATA[>=]]> to_date(#fecha_hasta#,'yyyymmdd')
>
> )
>
> AND (
>
> vwpm.f_desde_pm <![CDATA[<=]]> to_date(#fecha_desde#,'yyyymmdd')
>
> OR vwpm.f_desde_pm <![CDATA[<=]]> to_date(#fecha_hasta#,'yyyymmdd')
>
> )
>
> AND (
>
> vwpm.f_hasta_pm <![CDATA[>=]]> to_date(#fecha_desde#,'yyyymmdd')
>
> OR vwpm.f_hasta_pm <![CDATA[>=]]> to_date(#fecha_hasta#,'yyyymmdd')
>
> )
>
> AND (
>
> vwpm.f_desde_cpf <![CDATA[<=]]> to_date(#fecha_desde#,'yyyymmdd')
>
> OR vwpm.f_desde_cpf <![CDATA[<=]]> to_date(#fecha_hasta#,'yyyymmdd')
>
> )
>
> AND(
>
> vwpm.f_hasta_cpf <![CDATA[>=]]> to_date(#fecha_desde#,'yyyymmdd')
>
> OR vwpm.f_hasta_cpf <![CDATA[>=]]> to_date(#fecha_hasta#,'yyyymmdd')
>
> )
>
> AND (
>
> vwpm.f_desde_apmpf <![CDATA[<=]]> to_date(#fecha_desde#,'yyyymmdd')
>
> OR vwpm.f_desde_apmpf <![CDATA[<=]]> to_date(#fecha_hasta#,'yyyymmdd')
>
> )
>
> AND (
>
> vwpm.f_hasta_apmpf <![CDATA[>=]]> to_date(#fecha_desde#,'yyyymmdd')
>
> OR vwpm.f_hasta_apmpf <![CDATA[>=]]> to_date(#fecha_hasta#,'yyyymmdd')
>
> )
>
> AND (
>
> vwpm.f_desde_cpm <![CDATA[<=]]> to_date(#fecha_desde#,'yyyymmdd')
>
> OR vwpm.f_desde_cpm <![CDATA[<=]]> to_date(#fecha_hasta#,'yyyymmdd')
>
> )
>
> AND (
>
> vwpm.f_hasta_cpm <![CDATA[>=]]> to_date(#fecha_desde#,'yyyymmdd')
>
> OR vwpm.f_hasta_cpm <![CDATA[>=]]> to_date(#fecha_hasta#,'yyyymmdd')
>
> )
>
> AND (
>
> vwpm.f_desde_cpma <![CDATA[<=]]> to_date(#fecha_desde#,'yyyymmdd')
>
> OR vwpm.f_desde_cpma <![CDATA[<=]]> to_date(#fecha_hasta#,'yyyymmdd')
>
> )
>
> AND (
>
> vwpm.f_hasta_cpma <![CDATA[>=]]> to_date(#fecha_desde#,'yyyymmdd')
>
> OR vwpm.f_hasta_cpma <![CDATA[>=]]> to_date(#fecha_hasta#,'yyyymmdd')
>
> )
>
> AND (
>
> vwpm.f_desde_tc <![CDATA[<=]]> to_date(#fecha_desde#,'yyyymmdd')
>
> OR vwpm.f_desde_tc <![CDATA[<=]]> to_date(#fecha_hasta#,'yyyymmdd')
>
> )
>
> AND (
>
> vwpm.f_hasta_tc <![CDATA[>=]]> to_date(#fecha_desde#,'yyyymmdd')
>
> OR vwpm.f_hasta_tc <![CDATA[>=]]> to_date(#fecha_hasta#,'yyyymmdd')
>
> )
>
> </sql>
>
> <select id="obtenerCurvas" resultMap="curvaHorariaResult"
> parameterClass="curvaHoraria">
>
> SELECT distinct(guid_pm), fecha, valor_h01, valor_h02, valor_h03,
> valor_h04, valor_h05, valor_h06, valor_h07,
>
> valor_h08, valor_h09, valor_h10, valor_h11, valor_h12, valor_h13,
> valor_h14, valor_h15, valor_h16, valor_h17,
>
> valor_h18, valor_h19, valor_h20, valor_h21, valor_h22, valor_h23,
> valor_h24, valor_h25
>
> from FLUMEN.vw_puntos_medida_ve vwpm, flumen.variables_periodo vp,
> flumen.periodovar p
>
> where vwpm.id_ccaa = vp.id_sitio
>
> and substr(vwpm.tarifa, 1, 1) = substr(vp.tarifa, 1, 1)
>
> and vp.id_var = p.id_var
>
> and p.fecha <![CDATA[>=]]> #fecha_desde#
>
> and p.fecha <![CDATA[<=]]> #fecha_hasta#
>
> AND
>
> <include refid="fragmento_fechas"/>
>
> order by guid_pm, fecha
>
> </select>
>
> <select id="obtenerPMs" resultClass="java.lang.String"
> parameterClass="curvaHoraria">
>
> select distinct(guid_pm) from FLUMEN.vw_puntos_medida_ve vwpm
>
> WHERE
>
> <include refid="fragmento_fechas"/>
>
> </select>
>
> </sqlMap>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> ------------------------------------------------------------------
> This e-mail and the documents attached are confidential and intended
> solely
> for the addressee; it may also be privileged. If you receive this
> e-mail
> in error, please notify the sender immediately and destroy it.
> As its integrity cannot be secured on the Internet, the Atos Origin
> group
> liability cannot be triggered for the message content. Although the
> sender endeavours to maintain a computer virus-free network, the
> sender does
> not warrant that this transmission is virus-free and will not be
> liable for
> any damages resulting from any virus transmitted.
>
> Este mensaje y los ficheros adjuntos pueden contener informacion
> confidencial destinada solamente a la(s) persona(s) mencionadas
> anteriormente. Pueden estar protegidos por secreto profesional Si
> usted
> recibe este correo electronico por error, gracias de informar
> inmediatamente
> al remitente y destruir el mensaje.
> Al no estar asegurada la integridad de este mensaje sobre la red, Atos
> Origin no se hace responsable por su contenido. Su contenido no
> constituye
> ningun compromiso para el grupo Atos Origin, salvo ratificacion
> escrita por
> ambas partes.
> Aunque se esfuerza al maximo por mantener su red libre de virus, el
> emisor
> no puede garantizar nada al respecto y no sera responsable de
> cualesquiera
> danos que puedan resultar de una transmision de virus
> ------------------------------------------------------------------
>




------------------------------------------------------------------
This e-mail and the documents attached are confidential and intended solely
for the addressee; it may also be privileged. If you receive this e-mail
in error, please notify the sender immediately and destroy it.
As its integrity cannot be secured on the Internet, the Atos Origin group
liability cannot be triggered for the message content. Although the
sender endeavours to maintain a computer virus-free network, the sender does
not warrant that this transmission is virus-free and will not be liable for
any damages resulting from any virus transmitted.

Este mensaje y los ficheros adjuntos pueden contener informacion
confidencial destinada solamente a la(s) persona(s) mencionadas
anteriormente. Pueden estar protegidos por secreto profesional Si usted
recibe este correo electronico por error, gracias de informar inmediatamente
al remitente y destruir el mensaje.
Al no estar asegurada la integridad de este mensaje sobre la red, Atos
Origin no se hace responsable por su contenido. Su contenido no constituye
ningun compromiso para el grupo Atos Origin, salvo ratificacion escrita por
ambas partes.
Aunque se esfuerza al maximo por mantener su red libre de virus, el emisor
no puede garantizar nada al respecto y no sera responsable de cualesquiera
danos que puedan resultar de una transmision de virus
------------------------------------------------------------------



------------------------------------------------------------------
This e-mail and the documents attached are confidential and intended solely
for the addressee; it may also be privileged. If you receive this e-mail
in error, please notify the sender immediately and destroy it.
As its integrity cannot be secured on the Internet, the Atos Origin group
liability cannot be triggered for the message content. Although the
sender endeavours to maintain a computer virus-free network, the sender does
not warrant that this transmission is virus-free and will not be liable for
any damages resulting from any virus transmitted.

Este mensaje y los ficheros adjuntos pueden contener informacion
confidencial destinada solamente a la(s) persona(s) mencionadas
anteriormente. Pueden estar protegidos por secreto profesional Si usted
recibe este correo electronico por error, gracias de informar inmediatamente
al remitente y destruir el mensaje.
Al no estar asegurada la integridad de este mensaje sobre la red, Atos
Origin no se hace responsable por su contenido. Su contenido no constituye
ningun compromiso para el grupo Atos Origin, salvo ratificacion escrita por
ambas partes.
Aunque se esfuerza al maximo por mantener su red libre de virus, el emisor
no puede garantizar nada al respecto y no sera responsable de cualesquiera
danos que puedan resultar de una transmision de virus
------------------------------------------------------------------


RE: poor performance

Posted by Gerardo Corro Fuentes <ge...@mundivia.net>.
Hi,
 
-I cut the DTO marshalling part of the code for sake of brevity.
-Marshalling is not the problem since other ibatis DAO functions use the same DAO and read a lot of data and get results in few seconds
-I used the debug level in order to send you the whole info and get better help, but it's usually at level INFO
-This is a very weird problem.
 
Thanks!
 

________________________________

De: Clinton Begin [mailto:clinton.begin@gmail.com]
Enviado el: lun 28/01/2008 18:36
Para: user-java@ibatis.apache.org
Asunto: RE: poor performance



Oh,

And TURN OFF debugging logging when you do your timings with iBATIS.  The
iBATIS java.sql.* logs are very slow (think method level interceptor that
writes to the console!) and are only intended for debugging purposes.

Clinton 

-----Original Message-----
From: Gerardo Corro Fuentes [mailto:gerardo.corro@mundivia.net]
Sent: January-28-08 10:26 AM
To: user-java@ibatis.apache.org
Subject: RE: poor performance

Hi,

I must download big portions of data, the queries that work properly do that
with no problems at all. Next I'm attaching a JDBC class that retrieves the
data in three seconds, and after that comes the logs that show how ibatis
takes more than two minutes to do the same.

Thanks a lot!!!

package test;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import org.apache.commons.dbcp.BasicDataSource;
import com.mundivia.flumen.db.common.FactoriaSpring;
public class QueryTest {
 public static void main(String args[]) throws SQLException{

 
  BasicDataSource ds = (BasicDataSource)
FactoriaSpring.getApplicationContext().getBean("dataSource");
  Connection con = ds.getConnection();
  Statement stmt = con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,
    ResultSet.CONCUR_READ_ONLY);
 
  long start = System.currentTimeMillis();
 
 
  ResultSet srs = stmt.executeQuery("SELECT distinct(guid_pm), fecha,
valor_h01, valor_h02, valor_h03, valor_h04, valor_h05, valor_h06, valor_h07,
" +
    "valor_h08, valor_h09, valor_h10, valor_h11, valor_h12, valor_h13,
valor_h14, valor_h15, valor_h16, valor_h17, " +
    "valor_h18, valor_h19, valor_h20, valor_h21, valor_h22, valor_h23,
valor_h24, valor_h25 " +
    "from FLUMEN.vw_puntos_medida_ve vwpm, flumen.variables_periodo vp,
flumen.periodovar p " +
    "where vwpm.id_ccaa = vp.id_sitio " +
    "and substr(vwpm.tarifa, 1, 1) = substr(vp.tarifa, 1, 1) " +
    "and vp.id_var = p.id_var " +
    "and p.fecha >= '20071001' " +
    "and p.fecha <= '20071031' " +
    "AND " +
    "                      ( " +
    "                       vwpm.f_desde_pf <=
to_date('20071001','yyyymmdd') " +
    "                       OR vwpm.f_desde_pf <=
to_date('20071031','yyyymmdd') " +
    "          )    " +                             
    "  AND ( " +
    "              vwpm.f_hasta_pf >= to_date('20071001','yyyymmdd') " +
    "              OR vwpm.f_hasta_pf >= to_date('20071031','yyyymmdd') " +
    "  ) " +
    "  AND ( " +
    "                       vwpm.f_desde_pm <=
to_date('20071001','yyyymmdd') " +
    "                       OR vwpm.f_desde_pm <=
to_date('20071031','yyyymmdd') " +
    "  ) " +
    "  AND ( " +
    "                      vwpm.f_hasta_pm >= to_date('20071001','yyyymmdd')
" +
    "                      OR vwpm.f_hasta_pm >=
to_date('20071031','yyyymmdd') " +
    "  ) " +
    "  AND ( " +
    "                       vwpm.f_desde_cpf <=
to_date('20071001','yyyymmdd') " +
    "                       OR vwpm.f_desde_cpf <=
to_date('20071031','yyyymmdd') " +
    "  ) " +
    " AND( " +
    "                       vwpm.f_hasta_cpf >=
to_date('20071001','yyyymmdd') " +
    "                       OR vwpm.f_hasta_cpf >=
to_date('20071031','yyyymmdd') " +
    " )" +
    "  AND  ( " +
    "                       vwpm.f_desde_apmpf <=
to_date('20071001','yyyymmdd') " +
    "                       OR vwpm.f_desde_apmpf <=
to_date('20071031','yyyymmdd') " +
    " ) " +
    "  AND ( " +
    "                       vwpm.f_hasta_apmpf >=
to_date('20071001','yyyymmdd') " +
    "                       OR vwpm.f_hasta_apmpf >=
to_date('20071031','yyyymmdd') " +
    "  ) " +
    "  AND ( " +
    "                       vwpm.f_desde_cpm <=
to_date('20071001','yyyymmdd') " +
    "                       OR vwpm.f_desde_cpm <=
to_date('20071031','yyyymmdd') " +
    "  ) " +
    "  AND ( " +
    "                       vwpm.f_hasta_cpm >=
to_date('20071001','yyyymmdd') " +
    "                       OR vwpm.f_hasta_cpm >=
to_date('20071031','yyyymmdd') " +
    "  ) " +
    "  AND ( " +
    "                       vwpm.f_desde_cpma <=
to_date('20071001','yyyymmdd') " +
    "                       OR vwpm.f_desde_cpma <=
to_date('20071031','yyyymmdd') " +
    "  ) " +
    "  AND ( " +
    "                       vwpm.f_hasta_cpma >=
to_date('20071001','yyyymmdd') " +
    "                       OR vwpm.f_hasta_cpma >=
to_date('20071031','yyyymmdd') " +
    " ) " +
    " AND ( " +
    "                       vwpm.f_desde_tc <=
to_date('20071001','yyyymmdd') " +
    "                       OR vwpm.f_desde_tc <=
to_date('20071031','yyyymmdd') " +
    "  ) " +
    "  AND ( " +
    "                       vwpm.f_hasta_tc >=
to_date('20071001','yyyymmdd') " +
    "                       OR vwpm.f_hasta_tc >=
to_date('20071031','yyyymmdd') " +
    "  ) " +
  " order by guid_pm, fecha ");
  while (srs.next()) {
   //System.out.print("\nObtengo pm: " + srs.getString(1));
  }
 
  System.out.print("Se tardó: " +  (System.currentTimeMillis()-start));
 }
}


The logs are:

[main] INFO - Loading XML bean definitions from class path resource
[applicationContext-dao.xml]

[main] INFO - Loading XML bean definitions from class path resource
[applicationContext-dao-transacciones.xml]

[main] INFO - Loading XML bean definitions from class path resource
[applicationContext-service.xml]

[main] INFO - Bean factory for application context
[org.springframework.context.support.ClassPathXmlApplicationContext;hashCode
=19475750]:
org.springframework.beans.factory.support.DefaultListableBeanFactory
defining beans
[sqlMapClientTemplate,Prelacion0DAOTarget,Prelacion1DAOTarget,Prelacion2DAOT
arget,Prelacion3DAOTarget,CalculoMVHDAOTarget,Prelacion4DAOTarget,Prelacion6
DAOTarget,Prelacion7DAOTarget,Prelacion8DAOTarget,AltaMVHDAOTarget,propertyC
onfigurer,sqlMapClient,dataSource,Prelacion0DAO,Prelacion1DAO,Prelacion2DAO,
Prelacion3DAO,Prelacion4DAO,Prelacion6DAO,Prelacion7DAO,Prelacion8DAO,Calcul
oMVHDAO,AltaMVHDAO,transactionManager,defaultTxAttributes,Prelacion0Servicio
Target,Prelacion1ServicioTarget,Prelacion2ServicioTarget,Prelacion3ServicioT
arget,CurvaHorariaServicioTarget,Prelacion4ServicioTarget,Prelacion6Servicio
Target,Prelacion7ServicioTarget,Prelacion8ServicioTarget,AltaMVHServicioTarg
et,Prelacion0Servicio,Prelacion1Servicio,Prelacion2Servicio,Prelacion3Servic
io,Prelacion4Servicio,Prelacion6Servicio,Prelacion7Servicio,Prelacion8Servic
io,AltaMVHServicio,CurvaHorariaServicio]; root of BeanFactory hierarchy

[main] INFO - 46 beans defined in application context
[org.springframework.context.support.ClassPathXmlApplicationContext;hashCode
=19475750]

[main] INFO - Creating shared instance of singleton bean
'propertyConfigurer'

[main] INFO - Loading properties from class path resource
[database.properties]

[main] INFO - JDK 1.4+ collections available

[main] INFO - Commons Collections 3.x available

[main] INFO - Unable to locate MessageSource with name 'messageSource':
using default
[org.springframework.context.support.DelegatingMessageSource@82764b]

[main] INFO - Unable to locate ApplicationEventMulticaster with name
'applicationEventMulticaster': using default
[org.springframework.context.event.SimpleApplicationEventMulticaster@1bf3d87
]

[main] INFO - Pre-instantiating singletons in factory
[org.springframework.beans.factory.support.DefaultListableBeanFactory
defining beans
[sqlMapClientTemplate,Prelacion0DAOTarget,Prelacion1DAOTarget,Prelacion2DAOT
arget,Prelacion3DAOTarget,CalculoMVHDAOTarget,Prelacion4DAOTarget,Prelacion6
DAOTarget,Prelacion7DAOTarget,Prelacion8DAOTarget,AltaMVHDAOTarget,propertyC
onfigurer,sqlMapClient,dataSource,Prelacion0DAO,Prelacion1DAO,Prelacion2DAO,
Prelacion3DAO,Prelacion4DAO,Prelacion6DAO,Prelacion7DAO,Prelacion8DAO,Calcul
oMVHDAO,AltaMVHDAO,transactionManager,defaultTxAttributes,Prelacion0Servicio
Target,Prelacion1ServicioTarget,Prelacion2ServicioTarget,Prelacion3ServicioT
arget,CurvaHorariaServicioTarget,Prelacion4ServicioTarget,Prelacion6Servicio
Target,Prelacion7ServicioTarget,Prelacion8ServicioTarget,AltaMVHServicioTarg
et,Prelacion0Servicio,Prelacion1Servicio,Prelacion2Servicio,Prelacion3Servic
io,Prelacion4Servicio,Prelacion6Servicio,Prelacion7Servicio,Prelacion8Servic
io,AltaMVHServicio,CurvaHorariaServicio]; root of BeanFactory hierarchy]

[main] INFO - Creating shared instance of singleton bean
'sqlMapClientTemplate'

[main] INFO - Creating shared instance of singleton bean 'sqlMapClient'

[main] INFO - Creating shared instance of singleton bean 'dataSource'

[main] INFO - Creating shared instance of singleton bean
'Prelacion0DAOTarget'

[main] INFO - Creating shared instance of singleton bean
'Prelacion1DAOTarget'

[main] INFO - Creating shared instance of singleton bean
'Prelacion2DAOTarget'

[main] INFO - Creating shared instance of singleton bean
'Prelacion3DAOTarget'

[main] INFO - Creating shared instance of singleton bean
'CalculoMVHDAOTarget'

[main] INFO - Creating shared instance of singleton bean
'Prelacion4DAOTarget'

[main] INFO - Creating shared instance of singleton bean
'Prelacion6DAOTarget'

[main] INFO - Creating shared instance of singleton bean
'Prelacion7DAOTarget'

[main] INFO - Creating shared instance of singleton bean
'Prelacion8DAOTarget'

[main] INFO - Creating shared instance of singleton bean 'AltaMVHDAOTarget'

[main] INFO - Creating shared instance of singleton bean 'Prelacion0DAO'

[main] INFO - CGLIB2 not available: proxyTargetClass feature disabled

[main] INFO - Creating shared instance of singleton bean
'transactionManager'

[main] INFO - Creating shared instance of singleton bean
'defaultTxAttributes'

[main] INFO - Creating shared instance of singleton bean 'Prelacion1DAO'

[main] INFO - Creating shared instance of singleton bean 'Prelacion2DAO'

[main] INFO - Creating shared instance of singleton bean 'Prelacion3DAO'

[main] INFO - Creating shared instance of singleton bean 'Prelacion4DAO'

[main] INFO - Creating shared instance of singleton bean 'Prelacion6DAO'

[main] INFO - Creating shared instance of singleton bean 'Prelacion7DAO'

[main] INFO - Creating shared instance of singleton bean 'Prelacion8DAO'

[main] INFO - Creating shared instance of singleton bean 'CalculoMVHDAO'

[main] INFO - Creating shared instance of singleton bean 'AltaMVHDAO'

[main] INFO - Creating shared instance of singleton bean
'Prelacion0Servicio'

[main] INFO - Creating shared instance of singleton bean
'Prelacion1Servicio'

[main] INFO - Creating shared instance of singleton bean
'Prelacion2Servicio'

[main] INFO - Creating shared instance of singleton bean
'Prelacion3Servicio'

[main] INFO - Creating shared instance of singleton bean
'Prelacion4Servicio'

[main] INFO - Creating shared instance of singleton bean
'Prelacion6Servicio'

[main] INFO - Creating shared instance of singleton bean
'Prelacion7Servicio'

[main] INFO - Creating shared instance of singleton bean
'Prelacion8Servicio'

[main] INFO - Creating shared instance of singleton bean 'AltaMVHServicio'

[main] INFO - Creating shared instance of singleton bean
'CurvaHorariaServicio'

[main] INFO - JDBC 3.0 Savepoint class is available

[main] DEBUG - Using transaction object
[org.springframework.jdbc.datasource.DataSourceTransactionManager$DataSource
TransactionObject@187c55c]

[main] INFO - Prelacion1ServicioImpl:buscarPrelacion0 ...se van a buscar los
datos para prelacion 0

[main] DEBUG - Using transaction object
[org.springframework.jdbc.datasource.DataSourceTransactionManager$DataSource
TransactionObject@b02928]

[main] DEBUG - Executing action directly on SqlMapClient

[main] DEBUG - Opening JDBC Connection

[main] DEBUG - Registering transaction synchronization for JDBC Connection

[main] DEBUG - {conn-100000} Connection

[main] DEBUG - {conn-100000} Preparing Statement: select distinct(guid_pm)
from FLUMEN.vw_puntos_medida_ve vwpm WHERE ( vwpm.f_desde_pf <=
to_date(?,'yyyymmdd') OR vwpm.f_desde_pf <= to_date(?,'yyyymmdd') ) AND (
vwpm.f_hasta_pf >= to_date(?,'yyyymmdd') OR vwpm.f_hasta_pf >=
to_date(?,'yyyymmdd') ) AND ( vwpm.f_desde_pm <= to_date(?,'yyyymmdd') OR
vwpm.f_desde_pm <= to_date(?,'yyyymmdd') ) AND ( vwpm.f_hasta_pm >=
to_date(?,'yyyymmdd') OR vwpm.f_hasta_pm >= to_date(?,'yyyymmdd') ) AND (
vwpm.f_desde_cpf <= to_date(?,'yyyymmdd') OR vwpm.f_desde_cpf <=
to_date(?,'yyyymmdd') ) AND( vwpm.f_hasta_cpf >= to_date(?,'yyyymmdd') OR
vwpm.f_hasta_cpf >= to_date(?,'yyyymmdd') ) AND ( vwpm.f_desde_apmpf <=
to_date(?,'yyyymmdd') OR vwpm.f_desde_apmpf <= to_date(?,'yyyymmdd') ) AND (
vwpm.f_hasta_apmpf >= to_date(?,'yyyymmdd') OR vwpm.f_hasta_apmpf >=
to_date(?,'yyyymmdd') ) AND ( vwpm.f_desde_cpm <= to_date(?,'yyyymmdd') OR
vwpm.f_desde_cpm <= to_date(?,'yyyymmdd') ) AND ( vwpm.f_hasta_cpm >=
to_date(?,'yyyymmdd') OR vwpm.f_hasta_cpm >= to_date(?,'yyyymmdd') ) AND (
vwpm.f_desde_cpma <= to_date(?,'yyyymmdd') OR vwpm.f_desde_cpma <=
to_date(?,'yyyymmdd') ) AND ( vwpm.f_hasta_cpma >= to_date(?,'yyyymmdd') OR
vwpm.f_hasta_cpma >= to_date(?,'yyyymmdd') ) AND ( vwpm.f_desde_tc <=
to_date(?,'yyyymmdd') OR vwpm.f_desde_tc <= to_date(?,'yyyymmdd') ) AND (
vwpm.f_hasta_tc >= to_date(?,'yyyymmdd') OR vwpm.f_hasta_tc >=
to_date(?,'yyyymmdd') )

[main] DEBUG - {pstm-100001} Executing Statement: select distinct(guid_pm)
from FLUMEN.vw_puntos_medida_ve vwpm WHERE ( vwpm.f_desde_pf <=
to_date(?,'yyyymmdd') OR vwpm.f_desde_pf <= to_date(?,'yyyymmdd') ) AND (
vwpm.f_hasta_pf >= to_date(?,'yyyymmdd') OR vwpm.f_hasta_pf >=
to_date(?,'yyyymmdd') ) AND ( vwpm.f_desde_pm <= to_date(?,'yyyymmdd') OR
vwpm.f_desde_pm <= to_date(?,'yyyymmdd') ) AND ( vwpm.f_hasta_pm >=
to_date(?,'yyyymmdd') OR vwpm.f_hasta_pm >= to_date(?,'yyyymmdd') ) AND (
vwpm.f_desde_cpf <= to_date(?,'yyyymmdd') OR vwpm.f_desde_cpf <=
to_date(?,'yyyymmdd') ) AND( vwpm.f_hasta_cpf >= to_date(?,'yyyymmdd') OR
vwpm.f_hasta_cpf >= to_date(?,'yyyymmdd') ) AND ( vwpm.f_desde_apmpf <=
to_date(?,'yyyymmdd') OR vwpm.f_desde_apmpf <= to_date(?,'yyyymmdd') ) AND (
vwpm.f_hasta_apmpf >= to_date(?,'yyyymmdd') OR vwpm.f_hasta_apmpf >=
to_date(?,'yyyymmdd') ) AND ( vwpm.f_desde_cpm <= to_date(?,'yyyymmdd') OR
vwpm.f_desde_cpm <= to_date(?,'yyyymmdd') ) AND ( vwpm.f_hasta_cpm >=
to_date(?,'yyyymmdd') OR vwpm.f_hasta_cpm >= to_date(?,'yyyymmdd') ) AND (
vwpm.f_desde_cpma <= to_date(?,'yyyymmdd') OR vwpm.f_desde_cpma <=
to_date(?,'yyyymmdd') ) AND ( vwpm.f_hasta_cpma >= to_date(?,'yyyymmdd') OR
vwpm.f_hasta_cpma >= to_date(?,'yyyymmdd') ) AND ( vwpm.f_desde_tc <=
to_date(?,'yyyymmdd') OR vwpm.f_desde_tc <= to_date(?,'yyyymmdd') ) AND (
vwpm.f_hasta_tc >= to_date(?,'yyyymmdd') OR vwpm.f_hasta_tc >=
to_date(?,'yyyymmdd') )

[main] DEBUG - {pstm-100001} Parameters: [20071001, 20071030, 20071001,
20071030, 20071001, 20071030, 20071001, 20071030, 20071001, 20071030,
20071001, 20071030, 20071001, 20071030, 20071001, 20071030, 20071001,
20071030, 20071001, 20071030, 20071001, 20071030, 20071001, 20071030,
20071001, 20071030, 20071001, 20071030]

[main] DEBUG - {pstm-100001} Types: [java.lang.String, java.lang.String,
java.lang.String, java.lang.String, java.lang.String, java.lang.String,
java.lang.String, java.lang.String, java.lang.String, java.lang.String,
java.lang.String, java.lang.String, java.lang.String, java.lang.String,
java.lang.String, java.lang.String, java.lang.String, java.lang.String,
java.lang.String, java.lang.String, java.lang.String, java.lang.String,
java.lang.String, java.lang.String, java.lang.String, java.lang.String,
java.lang.String, java.lang.String]

[main] DEBUG - {rset-100002} ResultSet

[main] DEBUG - {rset-100002} Header: [GUID_PM]

[main] DEBUG - {rset-100002} Result: [7322]

[main] DEBUG - {rset-100002} Result: [7305]

[main] DEBUG - {rset-100002} Result: [1270102]

[main] DEBUG - {rset-100002} Result: [7298]

[main] DEBUG - {rset-100002} Result: [1284195]

[main] DEBUG - {rset-100002} Result: [1285724]

[main] DEBUG - {rset-100002} Result: [7539]

[main] DEBUG - {rset-100002} Result: [1309723]

[main] DEBUG - {rset-100002} Result: [1285091]

[main] DEBUG - {rset-100002} Result: [1323673]

[main] DEBUG - {rset-100002} Result: [1284043]

[main] DEBUG - {rset-100002} Result: [1283520]

[main] DEBUG - {rset-100002} Result: [38286]

[main] DEBUG - {rset-100002} Result: [1297556]

[main] DEBUG - {rset-100002} Result: [7542]

[main] DEBUG - {rset-100002} Result: [49352]

[main] DEBUG - {rset-100002} Result: [1305525]

[main] DEBUG - {rset-100002} Result: [1317347]

[main] DEBUG - {rset-100002} Result: [1297637]

[main] DEBUG - {rset-100002} Result: [1314151]

[main] DEBUG - {rset-100002} Result: [1324687]

[main] DEBUG - {rset-100002} Result: [1297583]

[main] DEBUG - {rset-100002} Result: [1297565]

[main] DEBUG - {rset-100002} Result: [1270186]

[main] DEBUG - {rset-100002} Result: [7300]

[main] DEBUG - {rset-100002} Result: [7294]

[main] DEBUG - {rset-100002} Result: [1314597]

[main] DEBUG - {rset-100002} Result: [1297855]

[main] DEBUG - {rset-100002} Result: [1314514]

[main] DEBUG - {rset-100002} Result: [1297619]

[main] DEBUG - {rset-100002} Result: [1305437]

[main] DEBUG - {rset-100002} Result: [1297437]

[main] DEBUG - {rset-100002} Result: [54124]

[main] DEBUG - {rset-100002} Result: [1306645]

[main] DEBUG - {rset-100002} Result: [1184876]

[main] DEBUG - {rset-100002} Result: [57808]

[main] DEBUG - {rset-100002} Result: [7471]

[main] DEBUG - {rset-100002} Result: [7520]

[main] DEBUG - {rset-100002} Result: [1322275]

[main] DEBUG - {rset-100002} Result: [1312879]

[main] DEBUG - {rset-100002} Result: [1312870]

[main] DEBUG - {rset-100002} Result: [1297497]

[main] DEBUG - {rset-100002} Result: [1297574]

[main] DEBUG - {rset-100002} Result: [1287044]

[main] DEBUG - {rset-100002} Result: [1314133]

[main] DEBUG - {rset-100002} Result: [1309732]

[main] DEBUG - {rset-100002} Result: [1314169]

[main] DEBUG - {rset-100002} Result: [58574]

[main] DEBUG - {rset-100002} Result: [1285781]

[main] DEBUG - {rset-100002} Result: [1297646]

[main] DEBUG - {rset-100002} Result: [7519]

[main] DEBUG - {rset-100002} Result: [1198695]

[main] DEBUG - {rset-100002} Result: [1306636]

[main] DEBUG - {rset-100002} Result: [48449]

[main] DEBUG - {rset-100002} Result: [1297628]

[main] DEBUG - {rset-100002} Result: [7522]

[main] DEBUG - {rset-100002} Result: [48738]

[main] DEBUG - {rset-100002} Result: [1270084]

[main] DEBUG - {rset-100002} Result: [1297419]

[main] DEBUG - {rset-100002} Result: [1314615]

[main] DEBUG - {rset-100002} Result: [1314606]

[main] DEBUG - {rset-100002} Result: [1313946]

[main] DEBUG - {rset-100002} Result: [1331045]

[main] DEBUG - {rset-100002} Result: [7469]

[main] DEBUG - {rset-100002} Result: [7283]

[main] DEBUG - {rset-100002} Result: [1297713]

[main] DEBUG - {rset-100002} Result: [1314550]

[main] DEBUG - {rset-100002} Result: [1324705]

[main] DEBUG - {rset-100002} Result: [1324669]

[main] DEBUG - {rset-100002} Result: [58584]

[main] DEBUG - {rset-100002} Result: [1305265]

[main] DEBUG - {rset-100002} Result: [1297683]

[main] DEBUG - {rset-100002} Result: [1312915]

[main] DEBUG - {rset-100002} Result: [1314142]

[main] DEBUG - {rset-100002} Result: [1297704]

[main] DEBUG - {rset-100002} Result: [1298358]

[main] DEBUG - {rset-100002} Result: [1297488]

[main] DEBUG - {rset-100002} Result: [1314541]

[main] DEBUG - {rset-100002} Result: [1324678]

[main] DEBUG - {rset-100002} Result: [57836]

[main] DEBUG - {rset-100002} Result: [57843]

[main] DEBUG - {rset-100002} Result: [1283553]

[main] DEBUG - {rset-100002} Result: [1286950]

[main] DEBUG - {rset-100002} Result: [7326]

[main] DEBUG - {rset-100002} Result: [7308]

[main] DEBUG - {rset-100002} Result: [1283436]

[main] DEBUG - {rset-100002} Result: [1285149]

[main] DEBUG - {rset-100002} Result: [1324273]

[main] DEBUG - {rset-100002} Result: [1285837]

[main] DEBUG - {rset-100002} Result: [1305880]

[main] DEBUG - {rset-100002} Result: [1204464]

[main] DEBUG - {rset-100002} Result: [7521]

[main] DEBUG - {rset-100002} Result: [7285]

[main] DEBUG - {rset-100002} Result: [1314523]

[main] DEBUG - {rset-100002} Result: [1314160]

[main] DEBUG - {rset-100002} Result: [1306244]

[main] DEBUG - {rset-100002} Result: [1296858]

[main] DEBUG - {rset-100002} Result: [48429]

[main] DEBUG - {rset-100002} Result: [1306169]

[main] DEBUG - {rset-100002} Result: [1285695]

[main] DEBUG - {rset-100002} Result: [1305274]

[main] DEBUG - {rset-100002} Result: [1306474]

[main] DEBUG - {rset-100002} Result: [6889]

[main] DEBUG - {rset-100002} Result: [1319257]

[main] DEBUG - {rset-100002} Result: [1324696]

[main] DEBUG - {rset-100002} Result: [7320]

[main] DEBUG - {rset-100002} Result: [1297524]

[main] DEBUG - {rset-100002} Result: [1270156]

[main] DEBUG - {rset-100002} Result: [7553]

[main] DEBUG - {rset-100002} Result: [1305552]

[main] DEBUG - {rset-100002} Result: [6877]

[main] DEBUG - {rset-100002} Result: [1195746]

[main] DEBUG - {rset-100002} Result: [26265]

[main] DEBUG - {rset-100002} Result: [1314178]

[main] DEBUG - {rset-100002} Result: [1314851]

[main] DEBUG - {rset-100002} Result: [1312906]

[main] DEBUG - {rset-100002} Result: [54089]

[main] DEBUG - {rset-100002} Result: [6871]

[main] DEBUG - {rset-100002} Result: [48388]

[main] DEBUG - {rset-100002} Result: [1324723]

[main] DEBUG - {rset-100002} Result: [1312897]

[main] DEBUG - {rset-100002} Result: [1285503]

[main] DEBUG - {rset-100002} Result: [1314633]

[main] DEBUG - {rset-100002} Result: [1306160]

[main] DEBUG - {rset-100002} Result: [1198656]

[main] DEBUG - {rset-100002} Result: [1297695]

[main] DEBUG - {rset-100002} Result: [7307]

[main] DEBUG - {rset-100002} Result: [1285850]

[main] DEBUG - {rset-100002} Result: [1198704]

[main] DEBUG - {rset-100002} Result: [1312888]

[main] DEBUG - {rset-100002} Result: [1296918]

[main] DEBUG - {rset-100002} Result: [1305534]

[main] DEBUG - {rset-100002} Result: [1312993]

[main] DEBUG - {rset-100002} Result: [1285533]

[main] DEBUG - {rset-100002} Result: [1270138]

[main] DEBUG - {rset-100002} Result: [1319282]

[main] DEBUG - {rset-100002} Result: [7290]

[main] DEBUG - {rset-100002} Result: [7289]

[main] DEBUG - {rset-100002} Result: [38291]

[main] DEBUG - {rset-100002} Result: [7541]

[main] DEBUG - {rset-100002} Result: [7287]

[main] DEBUG - {rset-100002} Result: [7284]

[main] DEBUG - {rset-100002} Result: [1297610]

[main] DEBUG - {rset-100002} Result: [1314532]

[main] DEBUG - {rset-100002} Result: [6981]

[main] DEBUG - {rset-100002} Result: [1324714]

[main] DEBUG - {rset-100002} Result: [1305650]

[main] DEBUG - {rset-100002} Result: [1312933]

[main] DEBUG - {rset-100002} Result: [48439]

[main] DEBUG - {rset-100002} Result: [1022538]

[main] DEBUG - {rset-100002} Result: [1285512]

[main] DEBUG - {rset-100002} Result: [1024146]

[main] DEBUG - {rset-100002} Result: [1024231]

[main] DEBUG - {rset-100002} Result: [1306483]

[main] DEBUG - {rset-100002} Result: [1285521]

[main] DEBUG - {rset-100002} Result: [1285862]

[main] DEBUG - {rset-100002} Result: [7327]

[main] DEBUG - {rset-100002} Result: [7301]

[main] DEBUG - {rset-100002} Result: [45626]

[main] DEBUG - {rset-100002} Result: [1314496]

[main] DEBUG - {rset-100002} Result: [1306253]

[main] DEBUG - {rset-100002} Result: [1285661]

[main] DEBUG - {rset-100002} Result: [1297601]

[main] DEBUG - {rset-100002} Result: [1314505]

[main] DEBUG - {rset-100002} Result: [1309714]

[main] DEBUG - {rset-100002} Result: [1305871]

[main] DEBUG - {rset-100002} Result: [1283382]

[main] DEBUG - {rset-100002} Result: [1324282]

[main] DEBUG - {rset-100002} Result: [1283403]

[main] DEBUG - {rset-100002} Result: [7288]

[main] DEBUG - {rset-100002} Result: [1284896]

[main] DEBUG - {rset-100002} Result: [1305862]

[main] DEBUG - {rset-100002} Result: [1312924]

[main] DEBUG - {rset-100002} Result: [1313005]

[main] DEBUG - {rset-100002} Result: [1198679]

[main] DEBUG - {rset-100002} Result: [1317239]

[main] DEBUG - {rset-100002} Result: [45565]

[main] DEBUG - {rset-100002} Result: [1296867]

[main] DEBUG - {rset-100002} Result: [49382]

[main] DEBUG - {rset-100002} Result: [1324264]

[main] DEBUG - {rset-100002} Result: [1294962]

[main] DEBUG - {rset-100002} Result: [1317338]

[main] DEBUG - {rset-100002} Result: [1314624]

[main] DEBUG - {rset-100002} Result: [38296]

[main] DEBUG - {rset-100002} Result: [7306]

[main] DEBUG - {rset-100002} Result: [1270120]

[main] DEBUG - {rset-100002} Result: [1321174]

[main] DEBUG - {rset-100002} Result: [1270198]

[main] DEBUG - {rset-100002} Result: [1283364]

[main] DEBUG - {rset-100002} Result: [7316]

[main] DEBUG - {rset-100002} Result: [7302]

[main] DEBUG - {rset-100002} Result: [7295]

[main] DEBUG - {rset-100002} Result: [6876]

[main] DEBUG - {rset-100002} Result: [26260]

[main] DEBUG - {rset-100002} Result: [1297674]

[main] DEBUG - {rset-100002} Result: [1196863]

[main] DEBUG - {rset-100002} Result: [1314735]

[main] DEBUG - {rset-100002} Result: [1285736]

[main] DEBUG - {rset-100002} Result: [1297428]

[main] DEBUG - {rset-100002} Result: [1195730]

[main] DEBUG - {rset-100002} Result: [1297365]

[main] DEBUG - {rset-100002} Result: [1293213]

[main] DEBUG - {rset-100002} Result: [1324294]

[main] DEBUG - {rset-100002} Result: [1324255]

[main] DEBUG - {rset-100002} Result: [1297547]

[main] DEBUG - {rset-100002} Result: [1305453]

[main] DEBUG - {rset-100002} Result: [7540]

[main] DEBUG - {rset-100002} Result: [1285359]

[main] DEBUG - {rset-100002} Result: [1283583]

[main] DEBUG - {rset-100002} Result: [1305543]

[main] DEBUG - {rset-100002} Result: [1297506]

[main] DEBUG - {rset-100002} Result: [1297592]

[main] DEBUG - {rset-100002} Result: [1022555]

[main] DEBUG - {rset-100002} Result: [58564]

[main] DEBUG - {rset-100002} Result: [1284878]

[main] DEBUG - {rset-100002} Result: [1306151]

[main] DEBUG - Triggering beforeCommit synchronization

[main] DEBUG - Triggering beforeCompletion synchronization

[main] DEBUG - Closing JDBC Connection

[main] DEBUG - Triggering afterCompletion synchronization

[main] DEBUG - Using transaction object
[org.springframework.jdbc.datasource.DataSourceTransactionManager$DataSource
TransactionObject@221e9e]

[main] INFO - Prelacion1ServicioImpl:buscarPrelacion0 ...se van a buscar los
datos para prelacion 0

[main] DEBUG - Using transaction object
[org.springframework.jdbc.datasource.DataSourceTransactionManager$DataSource
TransactionObject@1264eab]

[main] DEBUG - Executing action directly on SqlMapClient

[main] DEBUG - Opening JDBC Connection

[main] DEBUG - Registering transaction synchronization for JDBC Connection

[main] DEBUG - {conn-100003} Connection

[main] DEBUG - {conn-100003} Preparing Statement: SELECT distinct(guid_pm),
fecha, valor_h01, valor_h02, valor_h03, valor_h04, valor_h05, valor_h06,
valor_h07, valor_h08, valor_h09, valor_h10, valor_h11, valor_h12, valor_h13,
valor_h14, valor_h15, valor_h16, valor_h17, valor_h18, valor_h19, valor_h20,
valor_h21, valor_h22, valor_h23, valor_h24, valor_h25 from
FLUMEN.vw_puntos_medida_ve vwpm, flumen.variables_periodo vp,
flumen.periodovar p where vwpm.id_ccaa = vp.id_sitio and substr(vwpm.tarifa,
1, 1) = substr(vp.tarifa, 1, 1) and vp.id_var = p.id_var and p.fecha >= ?
and p.fecha <= ? AND ( vwpm.f_desde_pf <= to_date(?,'yyyymmdd') OR
vwpm.f_desde_pf <= to_date(?,'yyyymmdd') ) AND ( vwpm.f_hasta_pf >=
to_date(?,'yyyymmdd') OR vwpm.f_hasta_pf >= to_date(?,'yyyymmdd') ) AND (
vwpm.f_desde_pm <= to_date(?,'yyyymmdd') OR vwpm.f_desde_pm <=
to_date(?,'yyyymmdd') ) AND ( vwpm.f_hasta_pm >= to_date(?,'yyyymmdd') OR
vwpm.f_hasta_pm >= to_date(?,'yyyymmdd') ) AND ( vwpm.f_desde_cpf <=
to_date(?,'yyyymmdd') OR vwpm.f_desde_cpf <= to_date(?,'yyyymmdd') ) AND(
vwpm.f_hasta_cpf >= to_date(?,'yyyymmdd') OR vwpm.f_hasta_cpf >=
to_date(?,'yyyymmdd') ) AND ( vwpm.f_desde_apmpf <= to_date(?,'yyyymmdd') OR
vwpm.f_desde_apmpf <= to_date(?,'yyyymmdd') ) AND ( vwpm.f_hasta_apmpf >=
to_date(?,'yyyymmdd') OR vwpm.f_hasta_apmpf >= to_date(?,'yyyymmdd') ) AND (
vwpm.f_desde_cpm <= to_date(?,'yyyymmdd') OR vwpm.f_desde_cpm <=
to_date(?,'yyyymmdd') ) AND ( vwpm.f_hasta_cpm >= to_date(?,'yyyymmdd') OR
vwpm.f_hasta_cpm >= to_date(?,'yyyymmdd') ) AND ( vwpm.f_desde_cpma <=
to_date(?,'yyyymmdd') OR vwpm.f_desde_cpma <= to_date(?,'yyyymmdd') ) AND (
vwpm.f_hasta_cpma >= to_date(?,'yyyymmdd') OR vwpm.f_hasta_cpma >=
to_date(?,'yyyymmdd') ) AND ( vwpm.f_desde_tc <= to_date(?,'yyyymmdd') OR
vwpm.f_desde_tc <= to_date(?,'yyyymmdd') ) AND ( vwpm.f_hasta_tc >=
to_date(?,'yyyymmdd') OR vwpm.f_hasta_tc >= to_date(?,'yyyymmdd') ) order by
guid_pm, fecha

[main] DEBUG - {pstm-100004} Executing Statement: SELECT distinct(guid_pm),
fecha, valor_h01, valor_h02, valor_h03, valor_h04, valor_h05, valor_h06,
valor_h07, valor_h08, valor_h09, valor_h10, valor_h11, valor_h12, valor_h13,
valor_h14, valor_h15, valor_h16, valor_h17, valor_h18, valor_h19, valor_h20,
valor_h21, valor_h22, valor_h23, valor_h24, valor_h25 from
FLUMEN.vw_puntos_medida_ve vwpm, flumen.variables_periodo vp,
flumen.periodovar p where vwpm.id_ccaa = vp.id_sitio and substr(vwpm.tarifa,
1, 1) = substr(vp.tarifa, 1, 1) and vp.id_var = p.id_var and p.fecha >= ?
and p.fecha <= ? AND ( vwpm.f_desde_pf <= to_date(?,'yyyymmdd') OR
vwpm.f_desde_pf <= to_date(?,'yyyymmdd') ) AND ( vwpm.f_hasta_pf >=
to_date(?,'yyyymmdd') OR vwpm.f_hasta_pf >= to_date(?,'yyyymmdd') ) AND (
vwpm.f_desde_pm <= to_date(?,'yyyymmdd') OR vwpm.f_desde_pm <=
to_date(?,'yyyymmdd') ) AND ( vwpm.f_hasta_pm >= to_date(?,'yyyymmdd') OR
vwpm.f_hasta_pm >= to_date(?,'yyyymmdd') ) AND ( vwpm.f_desde_cpf <=
to_date(?,'yyyymmdd') OR vwpm.f_desde_cpf <= to_date(?,'yyyymmdd') ) AND(
vwpm.f_hasta_cpf >= to_date(?,'yyyymmdd') OR vwpm.f_hasta_cpf >=
to_date(?,'yyyymmdd') ) AND ( vwpm.f_desde_apmpf <= to_date(?,'yyyymmdd') OR
vwpm.f_desde_apmpf <= to_date(?,'yyyymmdd') ) AND ( vwpm.f_hasta_apmpf >=
to_date(?,'yyyymmdd') OR vwpm.f_hasta_apmpf >= to_date(?,'yyyymmdd') ) AND (
vwpm.f_desde_cpm <= to_date(?,'yyyymmdd') OR vwpm.f_desde_cpm <=
to_date(?,'yyyymmdd') ) AND ( vwpm.f_hasta_cpm >= to_date(?,'yyyymmdd') OR
vwpm.f_hasta_cpm >= to_date(?,'yyyymmdd') ) AND ( vwpm.f_desde_cpma <=
to_date(?,'yyyymmdd') OR vwpm.f_desde_cpma <= to_date(?,'yyyymmdd') ) AND (
vwpm.f_hasta_cpma >= to_date(?,'yyyymmdd') OR vwpm.f_hasta_cpma >=
to_date(?,'yyyymmdd') ) AND ( vwpm.f_desde_tc <= to_date(?,'yyyymmdd') OR
vwpm.f_desde_tc <= to_date(?,'yyyymmdd') ) AND ( vwpm.f_hasta_tc >=
to_date(?,'yyyymmdd') OR vwpm.f_hasta_tc >= to_date(?,'yyyymmdd') ) order by
guid_pm, fecha

[main] DEBUG - {pstm-100004} Parameters: [20071001, 20071030, 20071001,
20071030, 20071001, 20071030, 20071001, 20071030, 20071001, 20071030,
20071001, 20071030, 20071001, 20071030, 20071001, 20071030, 20071001,
20071030, 20071001, 20071030, 20071001, 20071030, 20071001, 20071030,
20071001, 20071030, 20071001, 20071030, 20071001, 20071030]

[main] DEBUG - {pstm-100004} Types: [java.lang.String, java.lang.String,
java.lang.String, java.lang.String, java.lang.String, java.lang.String,
java.lang.String, java.lang.String, java.lang.String, java.lang.String,
java.lang.String, java.lang.String, java.lang.String, java.lang.String,
java.lang.String, java.lang.String, java.lang.String, java.lang.String,
java.lang.String, java.lang.String, java.lang.String, java.lang.String,
java.lang.String, java.lang.String, java.lang.String, java.lang.String,
java.lang.String, java.lang.String, java.lang.String, java.lang.String]

[main] DEBUG - {rset-100005} ResultSet

[main] DEBUG - {rset-100005} Header: [guid_pm, fecha, valor_h01, valor_h02,
valor_h03, valor_h04, valor_h05, valor_h06, valor_h07, valor_h08, valor_h09,
valor_h10, valor_h11, valor_h12, valor_h13, valor_h14, valor_h15, valor_h16,
valor_h17, valor_h18, valor_h19, valor_h20, valor_h21, valor_h22, valor_h23,
valor_h24, valor_h25]

[main] DEBUG - {rset-100005} Result: [6871, 20071001, 6, 6, 6, 6, 6, 6, 6,
6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 5, 5, 5, 5, null]

[main] DEBUG - {rset-100005} Result: [6871, 20071002, 6, 6, 6, 6, 6, 6, 6,
6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 5, 5, 5, 5, null]

[main] DEBUG - {rset-100005} Result: [6871, 20071003, 6, 6, 6, 6, 6, 6, 6,
6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 5, 5, 5, 5, null]



... many more rows here....



[main] DEBUG - {rset-100005} Result: [1331045, 20071027, 6, 6, 6, 6, 6, 6,
6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, null]

[main] DEBUG - {rset-100005} Result: [1331045, 20071028, 6, 6, 6, 6, 6, 6,
6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, null]

[main] DEBUG - {rset-100005} Result: [1331045, 20071029, 6, 6, 6, 6, 6, 6,
6, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 5, 5, 5, 5, null]

[main] DEBUG - {rset-100005} Result: [1331045, 20071030, 6, 6, 6, 6, 6, 6,
6, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 5, 5, 5, 5, null]

[main] DEBUG - Triggering beforeCommit synchronization

[main] DEBUG - Triggering beforeCompletion synchronization

[main] DEBUG - Closing JDBC Connection

[main] DEBUG - Triggering afterCompletion synchronization

[main] INFO - All data was retrieved in: 148278ms


________________________________

De: Randall Svancara [mailto:rsvancara@wsu.edu]
Enviado el: lun 28/01/2008 18:05
Para: user-java@ibatis.apache.org
Asunto: Re: poor performance



Turn on debugging and send the output.  Also send the queries if you can
so that we know what you are trying to query within reason of course.

Also make sure you are querying the same database as you are querying in
with your jdbc driver.  Also make sure you are using query properly,
hitting the indexes and such.

Also, if you are returning back large record sets, consider returning
back smaller record sets, and if you can't, try using paginated results.

I know this some of this seems rudimentary, but let's get rid of the
obvious problems first.

-
Randall Svancara


On Mon, 2008-01-28 at 17:56 +0100, Gerardo Corro Fuentes wrote:
> Hi,
>
> I built a DAO with IBatis 2.2.0. Most of this DAO works properly,
> however thre are a couple of queries that are very slow, it takes 2
> minutes for them to be completed while a plain JDBC querie takes only
> three seconds.
>
> I verified the slow quieries many times, and they actually look very
> similar to others that run very fast.
>
> I also Spring 1.2; commons DBCP 1.4.
>
> Thanks!!!
>
>
>
> The ibatis config file looks like:
>
> <settings
>
> cacheModelsEnabled="false"
>
> enhancementEnabled="true"
>
> maxSessions="64"
>
> maxTransactions="8"
>
> maxRequests="128"
>
> useStatementNamespaces="true"/>
>
>
>
>
>
>
>
>
>
>
>
> <?sml version="1.0" encoding="UTF-8" ?>
>
> <!DOCTYPE sqlMap
>
> PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN"
>
> "http://www.ibatis.com/dtd/sql-map-2.dtd">
>
> <sqlMap namespace="CurvaHoraria">
>
> <typeAlias alias="curvaHoraria" type="com.db.dto.DTO1"/>
>
> <resultMap id="curvaHorariaResult" class="curvaHoraria">
>
> <result property="guidPm" column="guid_pm"/>
>
> <result property="fecha" column="fecha"/>
>
> <result property="periodo1" column="valor_h01"/>
>
> <result property="periodo2" column="valor_h02"/>
>
> <result property="periodo3" column="valor_h03"/>
>
> <result property="periodo4" column="valor_h04"/>
>
> <result property="periodo5" column="valor_h05"/>
>
> <result property="periodo6" column="valor_h06"/>
>
> <result property="periodo7" column="valor_h07"/>
>
> <result property="periodo8" column="valor_h08"/>
>
> <result property="periodo9" column="valor_h09"/>
>
> <result property="periodo10" column="valor_h10"/>
>
> <result property="periodo11" column="valor_h11"/>
>
> <result property="periodo12" column="valor_h12"/>
>
> <result property="periodo13" column="valor_h13"/>
>
> <result property="periodo14" column="valor_h14"/>
>
> <result property="periodo15" column="valor_h15"/>
>
> <result property="periodo16" column="valor_h16"/>
>
> <result property="periodo17" column="valor_h17"/>
>
> <result property="periodo18" column="valor_h18"/>
>
> <result property="periodo19" column="valor_h19"/>
>
> <result property="periodo20" column="valor_h20"/>
>
> <result property="periodo21" column="valor_h21"/>
>
> <result property="periodo22" column="valor_h22"/>
>
> <result property="periodo23" column="valor_h23"/>
>
> <result property="periodo24" column="valor_h24"/>
>
> <result property="periodo25" column="valor_h25"/>
>
> </resultMap>
>
> <sql id="fragmento_fechas">
>
> (
>
> vwpm.f_desde_pf <![CDATA[<=]]> to_date(#fecha_desde#,'yyyymmdd')
>
> OR vwpm.f_desde_pf <![CDATA[<=]]> to_date(#fecha_hasta#,'yyyymmdd')
>
> )
>
> AND (
>
> vwpm.f_hasta_pf <![CDATA[>=]]> to_date(#fecha_desde#,'yyyymmdd')
>
> OR vwpm.f_hasta_pf <![CDATA[>=]]> to_date(#fecha_hasta#,'yyyymmdd')
>
> )
>
> AND (
>
> vwpm.f_desde_pm <![CDATA[<=]]> to_date(#fecha_desde#,'yyyymmdd')
>
> OR vwpm.f_desde_pm <![CDATA[<=]]> to_date(#fecha_hasta#,'yyyymmdd')
>
> )
>
> AND (
>
> vwpm.f_hasta_pm <![CDATA[>=]]> to_date(#fecha_desde#,'yyyymmdd')
>
> OR vwpm.f_hasta_pm <![CDATA[>=]]> to_date(#fecha_hasta#,'yyyymmdd')
>
> )
>
> AND (
>
> vwpm.f_desde_cpf <![CDATA[<=]]> to_date(#fecha_desde#,'yyyymmdd')
>
> OR vwpm.f_desde_cpf <![CDATA[<=]]> to_date(#fecha_hasta#,'yyyymmdd')
>
> )
>
> AND(
>
> vwpm.f_hasta_cpf <![CDATA[>=]]> to_date(#fecha_desde#,'yyyymmdd')
>
> OR vwpm.f_hasta_cpf <![CDATA[>=]]> to_date(#fecha_hasta#,'yyyymmdd')
>
> )
>
> AND (
>
> vwpm.f_desde_apmpf <![CDATA[<=]]> to_date(#fecha_desde#,'yyyymmdd')
>
> OR vwpm.f_desde_apmpf <![CDATA[<=]]> to_date(#fecha_hasta#,'yyyymmdd')
>
> )
>
> AND (
>
> vwpm.f_hasta_apmpf <![CDATA[>=]]> to_date(#fecha_desde#,'yyyymmdd')
>
> OR vwpm.f_hasta_apmpf <![CDATA[>=]]> to_date(#fecha_hasta#,'yyyymmdd')
>
> )
>
> AND (
>
> vwpm.f_desde_cpm <![CDATA[<=]]> to_date(#fecha_desde#,'yyyymmdd')
>
> OR vwpm.f_desde_cpm <![CDATA[<=]]> to_date(#fecha_hasta#,'yyyymmdd')
>
> )
>
> AND (
>
> vwpm.f_hasta_cpm <![CDATA[>=]]> to_date(#fecha_desde#,'yyyymmdd')
>
> OR vwpm.f_hasta_cpm <![CDATA[>=]]> to_date(#fecha_hasta#,'yyyymmdd')
>
> )
>
> AND (
>
> vwpm.f_desde_cpma <![CDATA[<=]]> to_date(#fecha_desde#,'yyyymmdd')
>
> OR vwpm.f_desde_cpma <![CDATA[<=]]> to_date(#fecha_hasta#,'yyyymmdd')
>
> )
>
> AND (
>
> vwpm.f_hasta_cpma <![CDATA[>=]]> to_date(#fecha_desde#,'yyyymmdd')
>
> OR vwpm.f_hasta_cpma <![CDATA[>=]]> to_date(#fecha_hasta#,'yyyymmdd')
>
> )
>
> AND (
>
> vwpm.f_desde_tc <![CDATA[<=]]> to_date(#fecha_desde#,'yyyymmdd')
>
> OR vwpm.f_desde_tc <![CDATA[<=]]> to_date(#fecha_hasta#,'yyyymmdd')
>
> )
>
> AND (
>
> vwpm.f_hasta_tc <![CDATA[>=]]> to_date(#fecha_desde#,'yyyymmdd')
>
> OR vwpm.f_hasta_tc <![CDATA[>=]]> to_date(#fecha_hasta#,'yyyymmdd')
>
> )
>
> </sql>
>
> <select id="obtenerCurvas" resultMap="curvaHorariaResult"
> parameterClass="curvaHoraria">
>
> SELECT distinct(guid_pm), fecha, valor_h01, valor_h02, valor_h03,
> valor_h04, valor_h05, valor_h06, valor_h07,
>
> valor_h08, valor_h09, valor_h10, valor_h11, valor_h12, valor_h13,
> valor_h14, valor_h15, valor_h16, valor_h17,
>
> valor_h18, valor_h19, valor_h20, valor_h21, valor_h22, valor_h23,
> valor_h24, valor_h25
>
> from FLUMEN.vw_puntos_medida_ve vwpm, flumen.variables_periodo vp,
> flumen.periodovar p
>
> where vwpm.id_ccaa = vp.id_sitio
>
> and substr(vwpm.tarifa, 1, 1) = substr(vp.tarifa, 1, 1)
>
> and vp.id_var = p.id_var
>
> and p.fecha <![CDATA[>=]]> #fecha_desde#
>
> and p.fecha <![CDATA[<=]]> #fecha_hasta#
>
> AND
>
> <include refid="fragmento_fechas"/>
>
> order by guid_pm, fecha
>
> </select>
>
> <select id="obtenerPMs" resultClass="java.lang.String"
> parameterClass="curvaHoraria">
>
> select distinct(guid_pm) from FLUMEN.vw_puntos_medida_ve vwpm
>
> WHERE
>
> <include refid="fragmento_fechas"/>
>
> </select>
>
> </sqlMap>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> ------------------------------------------------------------------
> This e-mail and the documents attached are confidential and intended
> solely
> for the addressee; it may also be privileged. If you receive this
> e-mail
> in error, please notify the sender immediately and destroy it.
> As its integrity cannot be secured on the Internet, the Atos Origin
> group
> liability cannot be triggered for the message content. Although the
> sender endeavours to maintain a computer virus-free network, the
> sender does
> not warrant that this transmission is virus-free and will not be
> liable for
> any damages resulting from any virus transmitted.
>
> Este mensaje y los ficheros adjuntos pueden contener informacion
> confidencial destinada solamente a la(s) persona(s) mencionadas
> anteriormente. Pueden estar protegidos por secreto profesional Si
> usted
> recibe este correo electronico por error, gracias de informar
> inmediatamente
> al remitente y destruir el mensaje.
> Al no estar asegurada la integridad de este mensaje sobre la red, Atos
> Origin no se hace responsable por su contenido. Su contenido no
> constituye
> ningun compromiso para el grupo Atos Origin, salvo ratificacion
> escrita por
> ambas partes.
> Aunque se esfuerza al maximo por mantener su red libre de virus, el
> emisor
> no puede garantizar nada al respecto y no sera responsable de
> cualesquiera
> danos que puedan resultar de una transmision de virus
> ------------------------------------------------------------------
>




------------------------------------------------------------------
This e-mail and the documents attached are confidential and intended solely
for the addressee; it may also be privileged. If you receive this e-mail
in error, please notify the sender immediately and destroy it.
As its integrity cannot be secured on the Internet, the Atos Origin group
liability cannot be triggered for the message content. Although the
sender endeavours to maintain a computer virus-free network, the sender does
not warrant that this transmission is virus-free and will not be liable for
any damages resulting from any virus transmitted.

Este mensaje y los ficheros adjuntos pueden contener informacion
confidencial destinada solamente a la(s) persona(s) mencionadas
anteriormente. Pueden estar protegidos por secreto profesional Si usted
recibe este correo electronico por error, gracias de informar inmediatamente
al remitente y destruir el mensaje.
Al no estar asegurada la integridad de este mensaje sobre la red, Atos
Origin no se hace responsable por su contenido. Su contenido no constituye
ningun compromiso para el grupo Atos Origin, salvo ratificacion escrita por
ambas partes.
Aunque se esfuerza al maximo por mantener su red libre de virus, el emisor
no puede garantizar nada al respecto y no sera responsable de cualesquiera
danos que puedan resultar de una transmision de virus
------------------------------------------------------------------





------------------------------------------------------------------
This e-mail and the documents attached are confidential and intended solely
for the addressee; it may also be privileged. If you receive this e-mail
in error, please notify the sender immediately and destroy it.
As its integrity cannot be secured on the Internet, the Atos Origin group
liability cannot be triggered for the message content. Although the
sender endeavours to maintain a computer virus-free network, the sender does
not warrant that this transmission is virus-free and will not be liable for
any damages resulting from any virus transmitted.

Este mensaje y los ficheros adjuntos pueden contener informacion
confidencial destinada solamente a la(s) persona(s) mencionadas
anteriormente. Pueden estar protegidos por secreto profesional Si usted
recibe este correo electronico por error, gracias de informar inmediatamente
al remitente y destruir el mensaje.
Al no estar asegurada la integridad de este mensaje sobre la red, Atos
Origin no se hace responsable por su contenido. Su contenido no constituye
ningun compromiso para el grupo Atos Origin, salvo ratificacion escrita por
ambas partes.
Aunque se esfuerza al maximo por mantener su red libre de virus, el emisor
no puede garantizar nada al respecto y no sera responsable de cualesquiera
danos que puedan resultar de una transmision de virus
------------------------------------------------------------------


RE: poor performance

Posted by Clinton Begin <cl...@gmail.com>.
Oh, 

And TURN OFF debugging logging when you do your timings with iBATIS.  The
iBATIS java.sql.* logs are very slow (think method level interceptor that
writes to the console!) and are only intended for debugging purposes.

Clinton  

-----Original Message-----
From: Gerardo Corro Fuentes [mailto:gerardo.corro@mundivia.net] 
Sent: January-28-08 10:26 AM
To: user-java@ibatis.apache.org
Subject: RE: poor performance

Hi, 
 
I must download big portions of data, the queries that work properly do that
with no problems at all. Next I'm attaching a JDBC class that retrieves the
data in three seconds, and after that comes the logs that show how ibatis
takes more than two minutes to do the same.
 
Thanks a lot!!!
 
package test;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import org.apache.commons.dbcp.BasicDataSource;
import com.mundivia.flumen.db.common.FactoriaSpring;
public class QueryTest {
 public static void main(String args[]) throws SQLException{

  
  BasicDataSource ds = (BasicDataSource)
FactoriaSpring.getApplicationContext().getBean("dataSource");
  Connection con = ds.getConnection();
  Statement stmt = con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,
    ResultSet.CONCUR_READ_ONLY);
  
  long start = System.currentTimeMillis();
  
  
  ResultSet srs = stmt.executeQuery("SELECT distinct(guid_pm), fecha,
valor_h01, valor_h02, valor_h03, valor_h04, valor_h05, valor_h06, valor_h07,
" + 
    "valor_h08, valor_h09, valor_h10, valor_h11, valor_h12, valor_h13,
valor_h14, valor_h15, valor_h16, valor_h17, " +
    "valor_h18, valor_h19, valor_h20, valor_h21, valor_h22, valor_h23,
valor_h24, valor_h25 " +
    "from FLUMEN.vw_puntos_medida_ve vwpm, flumen.variables_periodo vp,
flumen.periodovar p " +
    "where vwpm.id_ccaa = vp.id_sitio " +
    "and substr(vwpm.tarifa, 1, 1) = substr(vp.tarifa, 1, 1) " +
    "and vp.id_var = p.id_var " +
    "and p.fecha >= '20071001' " +
    "and p.fecha <= '20071031' " +
    "AND " +
    "                      ( " +
    "                       vwpm.f_desde_pf <=
to_date('20071001','yyyymmdd') " +
    "                       OR vwpm.f_desde_pf <=
to_date('20071031','yyyymmdd') " +
    "          )    " +                              
    "  AND ( " +
    "              vwpm.f_hasta_pf >= to_date('20071001','yyyymmdd') " +
    "              OR vwpm.f_hasta_pf >= to_date('20071031','yyyymmdd') " +
    "  ) " +
    "  AND ( " +
    "                       vwpm.f_desde_pm <=
to_date('20071001','yyyymmdd') " +
    "                       OR vwpm.f_desde_pm <=
to_date('20071031','yyyymmdd') " +
    "  ) " +
    "  AND ( " +
    "                      vwpm.f_hasta_pm >= to_date('20071001','yyyymmdd')
" +
    "                      OR vwpm.f_hasta_pm >=
to_date('20071031','yyyymmdd') " +
    "  ) " +
    "  AND ( " +
    "                       vwpm.f_desde_cpf <=
to_date('20071001','yyyymmdd') " +
    "                       OR vwpm.f_desde_cpf <=
to_date('20071031','yyyymmdd') " +
    "  ) " +
    " AND( " +
    "                       vwpm.f_hasta_cpf >=
to_date('20071001','yyyymmdd') " +
    "                       OR vwpm.f_hasta_cpf >=
to_date('20071031','yyyymmdd') " +
    " )" +
    "  AND  ( " +
    "                       vwpm.f_desde_apmpf <=
to_date('20071001','yyyymmdd') " +
    "                       OR vwpm.f_desde_apmpf <=
to_date('20071031','yyyymmdd') " +
    " ) " +
    "  AND ( " +
    "                       vwpm.f_hasta_apmpf >=
to_date('20071001','yyyymmdd') " +
    "                       OR vwpm.f_hasta_apmpf >=
to_date('20071031','yyyymmdd') " +
    "  ) " +
    "  AND ( " +
    "                       vwpm.f_desde_cpm <=
to_date('20071001','yyyymmdd') " +
    "                       OR vwpm.f_desde_cpm <=
to_date('20071031','yyyymmdd') " +
    "  ) " +
    "  AND ( " +
    "                       vwpm.f_hasta_cpm >=
to_date('20071001','yyyymmdd') " +
    "                       OR vwpm.f_hasta_cpm >=
to_date('20071031','yyyymmdd') " +
    "  ) " +
    "  AND ( " +
    "                       vwpm.f_desde_cpma <=
to_date('20071001','yyyymmdd') " +
    "                       OR vwpm.f_desde_cpma <=
to_date('20071031','yyyymmdd') " +
    "  ) " +
    "  AND ( " +
    "                       vwpm.f_hasta_cpma >=
to_date('20071001','yyyymmdd') " +
    "                       OR vwpm.f_hasta_cpma >=
to_date('20071031','yyyymmdd') " +
    " ) " +
    " AND ( " +
    "                       vwpm.f_desde_tc <=
to_date('20071001','yyyymmdd') " + 
    "                       OR vwpm.f_desde_tc <=
to_date('20071031','yyyymmdd') " +
    "  ) " +
    "  AND ( " + 
    "                       vwpm.f_hasta_tc >=
to_date('20071001','yyyymmdd') " +
    "                       OR vwpm.f_hasta_tc >=
to_date('20071031','yyyymmdd') " +
    "  ) " +
  " order by guid_pm, fecha ");
  while (srs.next()) {
   //System.out.print("\nObtengo pm: " + srs.getString(1));
  }
  
  System.out.print("Se tardó: " +  (System.currentTimeMillis()-start));
 }
}
 
 
The logs are:
 
[main] INFO - Loading XML bean definitions from class path resource
[applicationContext-dao.xml]

[main] INFO - Loading XML bean definitions from class path resource
[applicationContext-dao-transacciones.xml]

[main] INFO - Loading XML bean definitions from class path resource
[applicationContext-service.xml]

[main] INFO - Bean factory for application context
[org.springframework.context.support.ClassPathXmlApplicationContext;hashCode
=19475750]:
org.springframework.beans.factory.support.DefaultListableBeanFactory
defining beans
[sqlMapClientTemplate,Prelacion0DAOTarget,Prelacion1DAOTarget,Prelacion2DAOT
arget,Prelacion3DAOTarget,CalculoMVHDAOTarget,Prelacion4DAOTarget,Prelacion6
DAOTarget,Prelacion7DAOTarget,Prelacion8DAOTarget,AltaMVHDAOTarget,propertyC
onfigurer,sqlMapClient,dataSource,Prelacion0DAO,Prelacion1DAO,Prelacion2DAO,
Prelacion3DAO,Prelacion4DAO,Prelacion6DAO,Prelacion7DAO,Prelacion8DAO,Calcul
oMVHDAO,AltaMVHDAO,transactionManager,defaultTxAttributes,Prelacion0Servicio
Target,Prelacion1ServicioTarget,Prelacion2ServicioTarget,Prelacion3ServicioT
arget,CurvaHorariaServicioTarget,Prelacion4ServicioTarget,Prelacion6Servicio
Target,Prelacion7ServicioTarget,Prelacion8ServicioTarget,AltaMVHServicioTarg
et,Prelacion0Servicio,Prelacion1Servicio,Prelacion2Servicio,Prelacion3Servic
io,Prelacion4Servicio,Prelacion6Servicio,Prelacion7Servicio,Prelacion8Servic
io,AltaMVHServicio,CurvaHorariaServicio]; root of BeanFactory hierarchy

[main] INFO - 46 beans defined in application context
[org.springframework.context.support.ClassPathXmlApplicationContext;hashCode
=19475750]

[main] INFO - Creating shared instance of singleton bean
'propertyConfigurer'

[main] INFO - Loading properties from class path resource
[database.properties]

[main] INFO - JDK 1.4+ collections available

[main] INFO - Commons Collections 3.x available

[main] INFO - Unable to locate MessageSource with name 'messageSource':
using default
[org.springframework.context.support.DelegatingMessageSource@82764b]

[main] INFO - Unable to locate ApplicationEventMulticaster with name
'applicationEventMulticaster': using default
[org.springframework.context.event.SimpleApplicationEventMulticaster@1bf3d87
]

[main] INFO - Pre-instantiating singletons in factory
[org.springframework.beans.factory.support.DefaultListableBeanFactory
defining beans
[sqlMapClientTemplate,Prelacion0DAOTarget,Prelacion1DAOTarget,Prelacion2DAOT
arget,Prelacion3DAOTarget,CalculoMVHDAOTarget,Prelacion4DAOTarget,Prelacion6
DAOTarget,Prelacion7DAOTarget,Prelacion8DAOTarget,AltaMVHDAOTarget,propertyC
onfigurer,sqlMapClient,dataSource,Prelacion0DAO,Prelacion1DAO,Prelacion2DAO,
Prelacion3DAO,Prelacion4DAO,Prelacion6DAO,Prelacion7DAO,Prelacion8DAO,Calcul
oMVHDAO,AltaMVHDAO,transactionManager,defaultTxAttributes,Prelacion0Servicio
Target,Prelacion1ServicioTarget,Prelacion2ServicioTarget,Prelacion3ServicioT
arget,CurvaHorariaServicioTarget,Prelacion4ServicioTarget,Prelacion6Servicio
Target,Prelacion7ServicioTarget,Prelacion8ServicioTarget,AltaMVHServicioTarg
et,Prelacion0Servicio,Prelacion1Servicio,Prelacion2Servicio,Prelacion3Servic
io,Prelacion4Servicio,Prelacion6Servicio,Prelacion7Servicio,Prelacion8Servic
io,AltaMVHServicio,CurvaHorariaServicio]; root of BeanFactory hierarchy]

[main] INFO - Creating shared instance of singleton bean
'sqlMapClientTemplate'

[main] INFO - Creating shared instance of singleton bean 'sqlMapClient'

[main] INFO - Creating shared instance of singleton bean 'dataSource'

[main] INFO - Creating shared instance of singleton bean
'Prelacion0DAOTarget'

[main] INFO - Creating shared instance of singleton bean
'Prelacion1DAOTarget'

[main] INFO - Creating shared instance of singleton bean
'Prelacion2DAOTarget'

[main] INFO - Creating shared instance of singleton bean
'Prelacion3DAOTarget'

[main] INFO - Creating shared instance of singleton bean
'CalculoMVHDAOTarget'

[main] INFO - Creating shared instance of singleton bean
'Prelacion4DAOTarget'

[main] INFO - Creating shared instance of singleton bean
'Prelacion6DAOTarget'

[main] INFO - Creating shared instance of singleton bean
'Prelacion7DAOTarget'

[main] INFO - Creating shared instance of singleton bean
'Prelacion8DAOTarget'

[main] INFO - Creating shared instance of singleton bean 'AltaMVHDAOTarget'

[main] INFO - Creating shared instance of singleton bean 'Prelacion0DAO'

[main] INFO - CGLIB2 not available: proxyTargetClass feature disabled

[main] INFO - Creating shared instance of singleton bean
'transactionManager'

[main] INFO - Creating shared instance of singleton bean
'defaultTxAttributes'

[main] INFO - Creating shared instance of singleton bean 'Prelacion1DAO'

[main] INFO - Creating shared instance of singleton bean 'Prelacion2DAO'

[main] INFO - Creating shared instance of singleton bean 'Prelacion3DAO'

[main] INFO - Creating shared instance of singleton bean 'Prelacion4DAO'

[main] INFO - Creating shared instance of singleton bean 'Prelacion6DAO'

[main] INFO - Creating shared instance of singleton bean 'Prelacion7DAO'

[main] INFO - Creating shared instance of singleton bean 'Prelacion8DAO'

[main] INFO - Creating shared instance of singleton bean 'CalculoMVHDAO'

[main] INFO - Creating shared instance of singleton bean 'AltaMVHDAO'

[main] INFO - Creating shared instance of singleton bean
'Prelacion0Servicio'

[main] INFO - Creating shared instance of singleton bean
'Prelacion1Servicio'

[main] INFO - Creating shared instance of singleton bean
'Prelacion2Servicio'

[main] INFO - Creating shared instance of singleton bean
'Prelacion3Servicio'

[main] INFO - Creating shared instance of singleton bean
'Prelacion4Servicio'

[main] INFO - Creating shared instance of singleton bean
'Prelacion6Servicio'

[main] INFO - Creating shared instance of singleton bean
'Prelacion7Servicio'

[main] INFO - Creating shared instance of singleton bean
'Prelacion8Servicio'

[main] INFO - Creating shared instance of singleton bean 'AltaMVHServicio'

[main] INFO - Creating shared instance of singleton bean
'CurvaHorariaServicio'

[main] INFO - JDBC 3.0 Savepoint class is available

[main] DEBUG - Using transaction object
[org.springframework.jdbc.datasource.DataSourceTransactionManager$DataSource
TransactionObject@187c55c]

[main] INFO - Prelacion1ServicioImpl:buscarPrelacion0 ...se van a buscar los
datos para prelacion 0

[main] DEBUG - Using transaction object
[org.springframework.jdbc.datasource.DataSourceTransactionManager$DataSource
TransactionObject@b02928]

[main] DEBUG - Executing action directly on SqlMapClient

[main] DEBUG - Opening JDBC Connection

[main] DEBUG - Registering transaction synchronization for JDBC Connection

[main] DEBUG - {conn-100000} Connection

[main] DEBUG - {conn-100000} Preparing Statement: select distinct(guid_pm)
from FLUMEN.vw_puntos_medida_ve vwpm WHERE ( vwpm.f_desde_pf <=
to_date(?,'yyyymmdd') OR vwpm.f_desde_pf <= to_date(?,'yyyymmdd') ) AND (
vwpm.f_hasta_pf >= to_date(?,'yyyymmdd') OR vwpm.f_hasta_pf >=
to_date(?,'yyyymmdd') ) AND ( vwpm.f_desde_pm <= to_date(?,'yyyymmdd') OR
vwpm.f_desde_pm <= to_date(?,'yyyymmdd') ) AND ( vwpm.f_hasta_pm >=
to_date(?,'yyyymmdd') OR vwpm.f_hasta_pm >= to_date(?,'yyyymmdd') ) AND (
vwpm.f_desde_cpf <= to_date(?,'yyyymmdd') OR vwpm.f_desde_cpf <=
to_date(?,'yyyymmdd') ) AND( vwpm.f_hasta_cpf >= to_date(?,'yyyymmdd') OR
vwpm.f_hasta_cpf >= to_date(?,'yyyymmdd') ) AND ( vwpm.f_desde_apmpf <=
to_date(?,'yyyymmdd') OR vwpm.f_desde_apmpf <= to_date(?,'yyyymmdd') ) AND (
vwpm.f_hasta_apmpf >= to_date(?,'yyyymmdd') OR vwpm.f_hasta_apmpf >=
to_date(?,'yyyymmdd') ) AND ( vwpm.f_desde_cpm <= to_date(?,'yyyymmdd') OR
vwpm.f_desde_cpm <= to_date(?,'yyyymmdd') ) AND ( vwpm.f_hasta_cpm >=
to_date(?,'yyyymmdd') OR vwpm.f_hasta_cpm >= to_date(?,'yyyymmdd') ) AND (
vwpm.f_desde_cpma <= to_date(?,'yyyymmdd') OR vwpm.f_desde_cpma <=
to_date(?,'yyyymmdd') ) AND ( vwpm.f_hasta_cpma >= to_date(?,'yyyymmdd') OR
vwpm.f_hasta_cpma >= to_date(?,'yyyymmdd') ) AND ( vwpm.f_desde_tc <=
to_date(?,'yyyymmdd') OR vwpm.f_desde_tc <= to_date(?,'yyyymmdd') ) AND (
vwpm.f_hasta_tc >= to_date(?,'yyyymmdd') OR vwpm.f_hasta_tc >=
to_date(?,'yyyymmdd') ) 

[main] DEBUG - {pstm-100001} Executing Statement: select distinct(guid_pm)
from FLUMEN.vw_puntos_medida_ve vwpm WHERE ( vwpm.f_desde_pf <=
to_date(?,'yyyymmdd') OR vwpm.f_desde_pf <= to_date(?,'yyyymmdd') ) AND (
vwpm.f_hasta_pf >= to_date(?,'yyyymmdd') OR vwpm.f_hasta_pf >=
to_date(?,'yyyymmdd') ) AND ( vwpm.f_desde_pm <= to_date(?,'yyyymmdd') OR
vwpm.f_desde_pm <= to_date(?,'yyyymmdd') ) AND ( vwpm.f_hasta_pm >=
to_date(?,'yyyymmdd') OR vwpm.f_hasta_pm >= to_date(?,'yyyymmdd') ) AND (
vwpm.f_desde_cpf <= to_date(?,'yyyymmdd') OR vwpm.f_desde_cpf <=
to_date(?,'yyyymmdd') ) AND( vwpm.f_hasta_cpf >= to_date(?,'yyyymmdd') OR
vwpm.f_hasta_cpf >= to_date(?,'yyyymmdd') ) AND ( vwpm.f_desde_apmpf <=
to_date(?,'yyyymmdd') OR vwpm.f_desde_apmpf <= to_date(?,'yyyymmdd') ) AND (
vwpm.f_hasta_apmpf >= to_date(?,'yyyymmdd') OR vwpm.f_hasta_apmpf >=
to_date(?,'yyyymmdd') ) AND ( vwpm.f_desde_cpm <= to_date(?,'yyyymmdd') OR
vwpm.f_desde_cpm <= to_date(?,'yyyymmdd') ) AND ( vwpm.f_hasta_cpm >=
to_date(?,'yyyymmdd') OR vwpm.f_hasta_cpm >= to_date(?,'yyyymmdd') ) AND (
vwpm.f_desde_cpma <= to_date(?,'yyyymmdd') OR vwpm.f_desde_cpma <=
to_date(?,'yyyymmdd') ) AND ( vwpm.f_hasta_cpma >= to_date(?,'yyyymmdd') OR
vwpm.f_hasta_cpma >= to_date(?,'yyyymmdd') ) AND ( vwpm.f_desde_tc <=
to_date(?,'yyyymmdd') OR vwpm.f_desde_tc <= to_date(?,'yyyymmdd') ) AND (
vwpm.f_hasta_tc >= to_date(?,'yyyymmdd') OR vwpm.f_hasta_tc >=
to_date(?,'yyyymmdd') ) 

[main] DEBUG - {pstm-100001} Parameters: [20071001, 20071030, 20071001,
20071030, 20071001, 20071030, 20071001, 20071030, 20071001, 20071030,
20071001, 20071030, 20071001, 20071030, 20071001, 20071030, 20071001,
20071030, 20071001, 20071030, 20071001, 20071030, 20071001, 20071030,
20071001, 20071030, 20071001, 20071030]

[main] DEBUG - {pstm-100001} Types: [java.lang.String, java.lang.String,
java.lang.String, java.lang.String, java.lang.String, java.lang.String,
java.lang.String, java.lang.String, java.lang.String, java.lang.String,
java.lang.String, java.lang.String, java.lang.String, java.lang.String,
java.lang.String, java.lang.String, java.lang.String, java.lang.String,
java.lang.String, java.lang.String, java.lang.String, java.lang.String,
java.lang.String, java.lang.String, java.lang.String, java.lang.String,
java.lang.String, java.lang.String]

[main] DEBUG - {rset-100002} ResultSet

[main] DEBUG - {rset-100002} Header: [GUID_PM]

[main] DEBUG - {rset-100002} Result: [7322]

[main] DEBUG - {rset-100002} Result: [7305]

[main] DEBUG - {rset-100002} Result: [1270102]

[main] DEBUG - {rset-100002} Result: [7298]

[main] DEBUG - {rset-100002} Result: [1284195]

[main] DEBUG - {rset-100002} Result: [1285724]

[main] DEBUG - {rset-100002} Result: [7539]

[main] DEBUG - {rset-100002} Result: [1309723]

[main] DEBUG - {rset-100002} Result: [1285091]

[main] DEBUG - {rset-100002} Result: [1323673]

[main] DEBUG - {rset-100002} Result: [1284043]

[main] DEBUG - {rset-100002} Result: [1283520]

[main] DEBUG - {rset-100002} Result: [38286]

[main] DEBUG - {rset-100002} Result: [1297556]

[main] DEBUG - {rset-100002} Result: [7542]

[main] DEBUG - {rset-100002} Result: [49352]

[main] DEBUG - {rset-100002} Result: [1305525]

[main] DEBUG - {rset-100002} Result: [1317347]

[main] DEBUG - {rset-100002} Result: [1297637]

[main] DEBUG - {rset-100002} Result: [1314151]

[main] DEBUG - {rset-100002} Result: [1324687]

[main] DEBUG - {rset-100002} Result: [1297583]

[main] DEBUG - {rset-100002} Result: [1297565]

[main] DEBUG - {rset-100002} Result: [1270186]

[main] DEBUG - {rset-100002} Result: [7300]

[main] DEBUG - {rset-100002} Result: [7294]

[main] DEBUG - {rset-100002} Result: [1314597]

[main] DEBUG - {rset-100002} Result: [1297855]

[main] DEBUG - {rset-100002} Result: [1314514]

[main] DEBUG - {rset-100002} Result: [1297619]

[main] DEBUG - {rset-100002} Result: [1305437]

[main] DEBUG - {rset-100002} Result: [1297437]

[main] DEBUG - {rset-100002} Result: [54124]

[main] DEBUG - {rset-100002} Result: [1306645]

[main] DEBUG - {rset-100002} Result: [1184876]

[main] DEBUG - {rset-100002} Result: [57808]

[main] DEBUG - {rset-100002} Result: [7471]

[main] DEBUG - {rset-100002} Result: [7520]

[main] DEBUG - {rset-100002} Result: [1322275]

[main] DEBUG - {rset-100002} Result: [1312879]

[main] DEBUG - {rset-100002} Result: [1312870]

[main] DEBUG - {rset-100002} Result: [1297497]

[main] DEBUG - {rset-100002} Result: [1297574]

[main] DEBUG - {rset-100002} Result: [1287044]

[main] DEBUG - {rset-100002} Result: [1314133]

[main] DEBUG - {rset-100002} Result: [1309732]

[main] DEBUG - {rset-100002} Result: [1314169]

[main] DEBUG - {rset-100002} Result: [58574]

[main] DEBUG - {rset-100002} Result: [1285781]

[main] DEBUG - {rset-100002} Result: [1297646]

[main] DEBUG - {rset-100002} Result: [7519]

[main] DEBUG - {rset-100002} Result: [1198695]

[main] DEBUG - {rset-100002} Result: [1306636]

[main] DEBUG - {rset-100002} Result: [48449]

[main] DEBUG - {rset-100002} Result: [1297628]

[main] DEBUG - {rset-100002} Result: [7522]

[main] DEBUG - {rset-100002} Result: [48738]

[main] DEBUG - {rset-100002} Result: [1270084]

[main] DEBUG - {rset-100002} Result: [1297419]

[main] DEBUG - {rset-100002} Result: [1314615]

[main] DEBUG - {rset-100002} Result: [1314606]

[main] DEBUG - {rset-100002} Result: [1313946]

[main] DEBUG - {rset-100002} Result: [1331045]

[main] DEBUG - {rset-100002} Result: [7469]

[main] DEBUG - {rset-100002} Result: [7283]

[main] DEBUG - {rset-100002} Result: [1297713]

[main] DEBUG - {rset-100002} Result: [1314550]

[main] DEBUG - {rset-100002} Result: [1324705]

[main] DEBUG - {rset-100002} Result: [1324669]

[main] DEBUG - {rset-100002} Result: [58584]

[main] DEBUG - {rset-100002} Result: [1305265]

[main] DEBUG - {rset-100002} Result: [1297683]

[main] DEBUG - {rset-100002} Result: [1312915]

[main] DEBUG - {rset-100002} Result: [1314142]

[main] DEBUG - {rset-100002} Result: [1297704]

[main] DEBUG - {rset-100002} Result: [1298358]

[main] DEBUG - {rset-100002} Result: [1297488]

[main] DEBUG - {rset-100002} Result: [1314541]

[main] DEBUG - {rset-100002} Result: [1324678]

[main] DEBUG - {rset-100002} Result: [57836]

[main] DEBUG - {rset-100002} Result: [57843]

[main] DEBUG - {rset-100002} Result: [1283553]

[main] DEBUG - {rset-100002} Result: [1286950]

[main] DEBUG - {rset-100002} Result: [7326]

[main] DEBUG - {rset-100002} Result: [7308]

[main] DEBUG - {rset-100002} Result: [1283436]

[main] DEBUG - {rset-100002} Result: [1285149]

[main] DEBUG - {rset-100002} Result: [1324273]

[main] DEBUG - {rset-100002} Result: [1285837]

[main] DEBUG - {rset-100002} Result: [1305880]

[main] DEBUG - {rset-100002} Result: [1204464]

[main] DEBUG - {rset-100002} Result: [7521]

[main] DEBUG - {rset-100002} Result: [7285]

[main] DEBUG - {rset-100002} Result: [1314523]

[main] DEBUG - {rset-100002} Result: [1314160]

[main] DEBUG - {rset-100002} Result: [1306244]

[main] DEBUG - {rset-100002} Result: [1296858]

[main] DEBUG - {rset-100002} Result: [48429]

[main] DEBUG - {rset-100002} Result: [1306169]

[main] DEBUG - {rset-100002} Result: [1285695]

[main] DEBUG - {rset-100002} Result: [1305274]

[main] DEBUG - {rset-100002} Result: [1306474]

[main] DEBUG - {rset-100002} Result: [6889]

[main] DEBUG - {rset-100002} Result: [1319257]

[main] DEBUG - {rset-100002} Result: [1324696]

[main] DEBUG - {rset-100002} Result: [7320]

[main] DEBUG - {rset-100002} Result: [1297524]

[main] DEBUG - {rset-100002} Result: [1270156]

[main] DEBUG - {rset-100002} Result: [7553]

[main] DEBUG - {rset-100002} Result: [1305552]

[main] DEBUG - {rset-100002} Result: [6877]

[main] DEBUG - {rset-100002} Result: [1195746]

[main] DEBUG - {rset-100002} Result: [26265]

[main] DEBUG - {rset-100002} Result: [1314178]

[main] DEBUG - {rset-100002} Result: [1314851]

[main] DEBUG - {rset-100002} Result: [1312906]

[main] DEBUG - {rset-100002} Result: [54089]

[main] DEBUG - {rset-100002} Result: [6871]

[main] DEBUG - {rset-100002} Result: [48388]

[main] DEBUG - {rset-100002} Result: [1324723]

[main] DEBUG - {rset-100002} Result: [1312897]

[main] DEBUG - {rset-100002} Result: [1285503]

[main] DEBUG - {rset-100002} Result: [1314633]

[main] DEBUG - {rset-100002} Result: [1306160]

[main] DEBUG - {rset-100002} Result: [1198656]

[main] DEBUG - {rset-100002} Result: [1297695]

[main] DEBUG - {rset-100002} Result: [7307]

[main] DEBUG - {rset-100002} Result: [1285850]

[main] DEBUG - {rset-100002} Result: [1198704]

[main] DEBUG - {rset-100002} Result: [1312888]

[main] DEBUG - {rset-100002} Result: [1296918]

[main] DEBUG - {rset-100002} Result: [1305534]

[main] DEBUG - {rset-100002} Result: [1312993]

[main] DEBUG - {rset-100002} Result: [1285533]

[main] DEBUG - {rset-100002} Result: [1270138]

[main] DEBUG - {rset-100002} Result: [1319282]

[main] DEBUG - {rset-100002} Result: [7290]

[main] DEBUG - {rset-100002} Result: [7289]

[main] DEBUG - {rset-100002} Result: [38291]

[main] DEBUG - {rset-100002} Result: [7541]

[main] DEBUG - {rset-100002} Result: [7287]

[main] DEBUG - {rset-100002} Result: [7284]

[main] DEBUG - {rset-100002} Result: [1297610]

[main] DEBUG - {rset-100002} Result: [1314532]

[main] DEBUG - {rset-100002} Result: [6981]

[main] DEBUG - {rset-100002} Result: [1324714]

[main] DEBUG - {rset-100002} Result: [1305650]

[main] DEBUG - {rset-100002} Result: [1312933]

[main] DEBUG - {rset-100002} Result: [48439]

[main] DEBUG - {rset-100002} Result: [1022538]

[main] DEBUG - {rset-100002} Result: [1285512]

[main] DEBUG - {rset-100002} Result: [1024146]

[main] DEBUG - {rset-100002} Result: [1024231]

[main] DEBUG - {rset-100002} Result: [1306483]

[main] DEBUG - {rset-100002} Result: [1285521]

[main] DEBUG - {rset-100002} Result: [1285862]

[main] DEBUG - {rset-100002} Result: [7327]

[main] DEBUG - {rset-100002} Result: [7301]

[main] DEBUG - {rset-100002} Result: [45626]

[main] DEBUG - {rset-100002} Result: [1314496]

[main] DEBUG - {rset-100002} Result: [1306253]

[main] DEBUG - {rset-100002} Result: [1285661]

[main] DEBUG - {rset-100002} Result: [1297601]

[main] DEBUG - {rset-100002} Result: [1314505]

[main] DEBUG - {rset-100002} Result: [1309714]

[main] DEBUG - {rset-100002} Result: [1305871]

[main] DEBUG - {rset-100002} Result: [1283382]

[main] DEBUG - {rset-100002} Result: [1324282]

[main] DEBUG - {rset-100002} Result: [1283403]

[main] DEBUG - {rset-100002} Result: [7288]

[main] DEBUG - {rset-100002} Result: [1284896]

[main] DEBUG - {rset-100002} Result: [1305862]

[main] DEBUG - {rset-100002} Result: [1312924]

[main] DEBUG - {rset-100002} Result: [1313005]

[main] DEBUG - {rset-100002} Result: [1198679]

[main] DEBUG - {rset-100002} Result: [1317239]

[main] DEBUG - {rset-100002} Result: [45565]

[main] DEBUG - {rset-100002} Result: [1296867]

[main] DEBUG - {rset-100002} Result: [49382]

[main] DEBUG - {rset-100002} Result: [1324264]

[main] DEBUG - {rset-100002} Result: [1294962]

[main] DEBUG - {rset-100002} Result: [1317338]

[main] DEBUG - {rset-100002} Result: [1314624]

[main] DEBUG - {rset-100002} Result: [38296]

[main] DEBUG - {rset-100002} Result: [7306]

[main] DEBUG - {rset-100002} Result: [1270120]

[main] DEBUG - {rset-100002} Result: [1321174]

[main] DEBUG - {rset-100002} Result: [1270198]

[main] DEBUG - {rset-100002} Result: [1283364]

[main] DEBUG - {rset-100002} Result: [7316]

[main] DEBUG - {rset-100002} Result: [7302]

[main] DEBUG - {rset-100002} Result: [7295]

[main] DEBUG - {rset-100002} Result: [6876]

[main] DEBUG - {rset-100002} Result: [26260]

[main] DEBUG - {rset-100002} Result: [1297674]

[main] DEBUG - {rset-100002} Result: [1196863]

[main] DEBUG - {rset-100002} Result: [1314735]

[main] DEBUG - {rset-100002} Result: [1285736]

[main] DEBUG - {rset-100002} Result: [1297428]

[main] DEBUG - {rset-100002} Result: [1195730]

[main] DEBUG - {rset-100002} Result: [1297365]

[main] DEBUG - {rset-100002} Result: [1293213]

[main] DEBUG - {rset-100002} Result: [1324294]

[main] DEBUG - {rset-100002} Result: [1324255]

[main] DEBUG - {rset-100002} Result: [1297547]

[main] DEBUG - {rset-100002} Result: [1305453]

[main] DEBUG - {rset-100002} Result: [7540]

[main] DEBUG - {rset-100002} Result: [1285359]

[main] DEBUG - {rset-100002} Result: [1283583]

[main] DEBUG - {rset-100002} Result: [1305543]

[main] DEBUG - {rset-100002} Result: [1297506]

[main] DEBUG - {rset-100002} Result: [1297592]

[main] DEBUG - {rset-100002} Result: [1022555]

[main] DEBUG - {rset-100002} Result: [58564]

[main] DEBUG - {rset-100002} Result: [1284878]

[main] DEBUG - {rset-100002} Result: [1306151]

[main] DEBUG - Triggering beforeCommit synchronization

[main] DEBUG - Triggering beforeCompletion synchronization

[main] DEBUG - Closing JDBC Connection

[main] DEBUG - Triggering afterCompletion synchronization

[main] DEBUG - Using transaction object
[org.springframework.jdbc.datasource.DataSourceTransactionManager$DataSource
TransactionObject@221e9e]

[main] INFO - Prelacion1ServicioImpl:buscarPrelacion0 ...se van a buscar los
datos para prelacion 0

[main] DEBUG - Using transaction object
[org.springframework.jdbc.datasource.DataSourceTransactionManager$DataSource
TransactionObject@1264eab]

[main] DEBUG - Executing action directly on SqlMapClient

[main] DEBUG - Opening JDBC Connection

[main] DEBUG - Registering transaction synchronization for JDBC Connection

[main] DEBUG - {conn-100003} Connection

[main] DEBUG - {conn-100003} Preparing Statement: SELECT distinct(guid_pm),
fecha, valor_h01, valor_h02, valor_h03, valor_h04, valor_h05, valor_h06,
valor_h07, valor_h08, valor_h09, valor_h10, valor_h11, valor_h12, valor_h13,
valor_h14, valor_h15, valor_h16, valor_h17, valor_h18, valor_h19, valor_h20,
valor_h21, valor_h22, valor_h23, valor_h24, valor_h25 from
FLUMEN.vw_puntos_medida_ve vwpm, flumen.variables_periodo vp,
flumen.periodovar p where vwpm.id_ccaa = vp.id_sitio and substr(vwpm.tarifa,
1, 1) = substr(vp.tarifa, 1, 1) and vp.id_var = p.id_var and p.fecha >= ?
and p.fecha <= ? AND ( vwpm.f_desde_pf <= to_date(?,'yyyymmdd') OR
vwpm.f_desde_pf <= to_date(?,'yyyymmdd') ) AND ( vwpm.f_hasta_pf >=
to_date(?,'yyyymmdd') OR vwpm.f_hasta_pf >= to_date(?,'yyyymmdd') ) AND (
vwpm.f_desde_pm <= to_date(?,'yyyymmdd') OR vwpm.f_desde_pm <=
to_date(?,'yyyymmdd') ) AND ( vwpm.f_hasta_pm >= to_date(?,'yyyymmdd') OR
vwpm.f_hasta_pm >= to_date(?,'yyyymmdd') ) AND ( vwpm.f_desde_cpf <=
to_date(?,'yyyymmdd') OR vwpm.f_desde_cpf <= to_date(?,'yyyymmdd') ) AND(
vwpm.f_hasta_cpf >= to_date(?,'yyyymmdd') OR vwpm.f_hasta_cpf >=
to_date(?,'yyyymmdd') ) AND ( vwpm.f_desde_apmpf <= to_date(?,'yyyymmdd') OR
vwpm.f_desde_apmpf <= to_date(?,'yyyymmdd') ) AND ( vwpm.f_hasta_apmpf >=
to_date(?,'yyyymmdd') OR vwpm.f_hasta_apmpf >= to_date(?,'yyyymmdd') ) AND (
vwpm.f_desde_cpm <= to_date(?,'yyyymmdd') OR vwpm.f_desde_cpm <=
to_date(?,'yyyymmdd') ) AND ( vwpm.f_hasta_cpm >= to_date(?,'yyyymmdd') OR
vwpm.f_hasta_cpm >= to_date(?,'yyyymmdd') ) AND ( vwpm.f_desde_cpma <=
to_date(?,'yyyymmdd') OR vwpm.f_desde_cpma <= to_date(?,'yyyymmdd') ) AND (
vwpm.f_hasta_cpma >= to_date(?,'yyyymmdd') OR vwpm.f_hasta_cpma >=
to_date(?,'yyyymmdd') ) AND ( vwpm.f_desde_tc <= to_date(?,'yyyymmdd') OR
vwpm.f_desde_tc <= to_date(?,'yyyymmdd') ) AND ( vwpm.f_hasta_tc >=
to_date(?,'yyyymmdd') OR vwpm.f_hasta_tc >= to_date(?,'yyyymmdd') ) order by
guid_pm, fecha 

[main] DEBUG - {pstm-100004} Executing Statement: SELECT distinct(guid_pm),
fecha, valor_h01, valor_h02, valor_h03, valor_h04, valor_h05, valor_h06,
valor_h07, valor_h08, valor_h09, valor_h10, valor_h11, valor_h12, valor_h13,
valor_h14, valor_h15, valor_h16, valor_h17, valor_h18, valor_h19, valor_h20,
valor_h21, valor_h22, valor_h23, valor_h24, valor_h25 from
FLUMEN.vw_puntos_medida_ve vwpm, flumen.variables_periodo vp,
flumen.periodovar p where vwpm.id_ccaa = vp.id_sitio and substr(vwpm.tarifa,
1, 1) = substr(vp.tarifa, 1, 1) and vp.id_var = p.id_var and p.fecha >= ?
and p.fecha <= ? AND ( vwpm.f_desde_pf <= to_date(?,'yyyymmdd') OR
vwpm.f_desde_pf <= to_date(?,'yyyymmdd') ) AND ( vwpm.f_hasta_pf >=
to_date(?,'yyyymmdd') OR vwpm.f_hasta_pf >= to_date(?,'yyyymmdd') ) AND (
vwpm.f_desde_pm <= to_date(?,'yyyymmdd') OR vwpm.f_desde_pm <=
to_date(?,'yyyymmdd') ) AND ( vwpm.f_hasta_pm >= to_date(?,'yyyymmdd') OR
vwpm.f_hasta_pm >= to_date(?,'yyyymmdd') ) AND ( vwpm.f_desde_cpf <=
to_date(?,'yyyymmdd') OR vwpm.f_desde_cpf <= to_date(?,'yyyymmdd') ) AND(
vwpm.f_hasta_cpf >= to_date(?,'yyyymmdd') OR vwpm.f_hasta_cpf >=
to_date(?,'yyyymmdd') ) AND ( vwpm.f_desde_apmpf <= to_date(?,'yyyymmdd') OR
vwpm.f_desde_apmpf <= to_date(?,'yyyymmdd') ) AND ( vwpm.f_hasta_apmpf >=
to_date(?,'yyyymmdd') OR vwpm.f_hasta_apmpf >= to_date(?,'yyyymmdd') ) AND (
vwpm.f_desde_cpm <= to_date(?,'yyyymmdd') OR vwpm.f_desde_cpm <=
to_date(?,'yyyymmdd') ) AND ( vwpm.f_hasta_cpm >= to_date(?,'yyyymmdd') OR
vwpm.f_hasta_cpm >= to_date(?,'yyyymmdd') ) AND ( vwpm.f_desde_cpma <=
to_date(?,'yyyymmdd') OR vwpm.f_desde_cpma <= to_date(?,'yyyymmdd') ) AND (
vwpm.f_hasta_cpma >= to_date(?,'yyyymmdd') OR vwpm.f_hasta_cpma >=
to_date(?,'yyyymmdd') ) AND ( vwpm.f_desde_tc <= to_date(?,'yyyymmdd') OR
vwpm.f_desde_tc <= to_date(?,'yyyymmdd') ) AND ( vwpm.f_hasta_tc >=
to_date(?,'yyyymmdd') OR vwpm.f_hasta_tc >= to_date(?,'yyyymmdd') ) order by
guid_pm, fecha 

[main] DEBUG - {pstm-100004} Parameters: [20071001, 20071030, 20071001,
20071030, 20071001, 20071030, 20071001, 20071030, 20071001, 20071030,
20071001, 20071030, 20071001, 20071030, 20071001, 20071030, 20071001,
20071030, 20071001, 20071030, 20071001, 20071030, 20071001, 20071030,
20071001, 20071030, 20071001, 20071030, 20071001, 20071030]

[main] DEBUG - {pstm-100004} Types: [java.lang.String, java.lang.String,
java.lang.String, java.lang.String, java.lang.String, java.lang.String,
java.lang.String, java.lang.String, java.lang.String, java.lang.String,
java.lang.String, java.lang.String, java.lang.String, java.lang.String,
java.lang.String, java.lang.String, java.lang.String, java.lang.String,
java.lang.String, java.lang.String, java.lang.String, java.lang.String,
java.lang.String, java.lang.String, java.lang.String, java.lang.String,
java.lang.String, java.lang.String, java.lang.String, java.lang.String]

[main] DEBUG - {rset-100005} ResultSet

[main] DEBUG - {rset-100005} Header: [guid_pm, fecha, valor_h01, valor_h02,
valor_h03, valor_h04, valor_h05, valor_h06, valor_h07, valor_h08, valor_h09,
valor_h10, valor_h11, valor_h12, valor_h13, valor_h14, valor_h15, valor_h16,
valor_h17, valor_h18, valor_h19, valor_h20, valor_h21, valor_h22, valor_h23,
valor_h24, valor_h25]

[main] DEBUG - {rset-100005} Result: [6871, 20071001, 6, 6, 6, 6, 6, 6, 6,
6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 5, 5, 5, 5, null]

[main] DEBUG - {rset-100005} Result: [6871, 20071002, 6, 6, 6, 6, 6, 6, 6,
6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 5, 5, 5, 5, null]

[main] DEBUG - {rset-100005} Result: [6871, 20071003, 6, 6, 6, 6, 6, 6, 6,
6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 5, 5, 5, 5, null]

 

... many more rows here....

 

[main] DEBUG - {rset-100005} Result: [1331045, 20071027, 6, 6, 6, 6, 6, 6,
6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, null]

[main] DEBUG - {rset-100005} Result: [1331045, 20071028, 6, 6, 6, 6, 6, 6,
6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, null]

[main] DEBUG - {rset-100005} Result: [1331045, 20071029, 6, 6, 6, 6, 6, 6,
6, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 5, 5, 5, 5, null]

[main] DEBUG - {rset-100005} Result: [1331045, 20071030, 6, 6, 6, 6, 6, 6,
6, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 5, 5, 5, 5, null]

[main] DEBUG - Triggering beforeCommit synchronization

[main] DEBUG - Triggering beforeCompletion synchronization

[main] DEBUG - Closing JDBC Connection

[main] DEBUG - Triggering afterCompletion synchronization

[main] INFO - All data was retrieved in: 148278ms


________________________________

De: Randall Svancara [mailto:rsvancara@wsu.edu]
Enviado el: lun 28/01/2008 18:05
Para: user-java@ibatis.apache.org
Asunto: Re: poor performance



Turn on debugging and send the output.  Also send the queries if you can
so that we know what you are trying to query within reason of course. 

Also make sure you are querying the same database as you are querying in
with your jdbc driver.  Also make sure you are using query properly,
hitting the indexes and such. 

Also, if you are returning back large record sets, consider returning
back smaller record sets, and if you can't, try using paginated results.

I know this some of this seems rudimentary, but let's get rid of the
obvious problems first.

- 
Randall Svancara


On Mon, 2008-01-28 at 17:56 +0100, Gerardo Corro Fuentes wrote:
> Hi,
> 
> I built a DAO with IBatis 2.2.0. Most of this DAO works properly,
> however thre are a couple of queries that are very slow, it takes 2
> minutes for them to be completed while a plain JDBC querie takes only
> three seconds.
> 
> I verified the slow quieries many times, and they actually look very
> similar to others that run very fast.
> 
> I also Spring 1.2; commons DBCP 1.4.
> 
> Thanks!!!
> 
>
>
> The ibatis config file looks like:
> 
> <settings
>
> cacheModelsEnabled="false"
>
> enhancementEnabled="true"
>
> maxSessions="64"
>
> maxTransactions="8"
>
> maxRequests="128"
>
> useStatementNamespaces="true"/>
>
> 
>
>
>
>
>
>
>
>
>
> <?sml version="1.0" encoding="UTF-8" ?>
>
> <!DOCTYPE sqlMap
>
> PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN"
>
> "http://www.ibatis.com/dtd/sql-map-2.dtd">
>
> <sqlMap namespace="CurvaHoraria">
>
> <typeAlias alias="curvaHoraria" type="com.db.dto.DTO1"/>
>
> <resultMap id="curvaHorariaResult" class="curvaHoraria">
>
> <result property="guidPm" column="guid_pm"/>
>
> <result property="fecha" column="fecha"/>
>
> <result property="periodo1" column="valor_h01"/>
>
> <result property="periodo2" column="valor_h02"/>
>
> <result property="periodo3" column="valor_h03"/>
>
> <result property="periodo4" column="valor_h04"/>
>
> <result property="periodo5" column="valor_h05"/>
>
> <result property="periodo6" column="valor_h06"/>
>
> <result property="periodo7" column="valor_h07"/>
>
> <result property="periodo8" column="valor_h08"/>
>
> <result property="periodo9" column="valor_h09"/>
>
> <result property="periodo10" column="valor_h10"/>
>
> <result property="periodo11" column="valor_h11"/>
>
> <result property="periodo12" column="valor_h12"/>
>
> <result property="periodo13" column="valor_h13"/>
>
> <result property="periodo14" column="valor_h14"/>
>
> <result property="periodo15" column="valor_h15"/>
>
> <result property="periodo16" column="valor_h16"/>
>
> <result property="periodo17" column="valor_h17"/>
>
> <result property="periodo18" column="valor_h18"/>
>
> <result property="periodo19" column="valor_h19"/>
>
> <result property="periodo20" column="valor_h20"/>
>
> <result property="periodo21" column="valor_h21"/>
>
> <result property="periodo22" column="valor_h22"/>
>
> <result property="periodo23" column="valor_h23"/>
>
> <result property="periodo24" column="valor_h24"/>
>
> <result property="periodo25" column="valor_h25"/>
>
> </resultMap>
>
> <sql id="fragmento_fechas">
>
> (
>
> vwpm.f_desde_pf <![CDATA[<=]]> to_date(#fecha_desde#,'yyyymmdd')
>
> OR vwpm.f_desde_pf <![CDATA[<=]]> to_date(#fecha_hasta#,'yyyymmdd')
>
> )
>
> AND (
>
> vwpm.f_hasta_pf <![CDATA[>=]]> to_date(#fecha_desde#,'yyyymmdd')
>
> OR vwpm.f_hasta_pf <![CDATA[>=]]> to_date(#fecha_hasta#,'yyyymmdd')
>
> )
>
> AND (
>
> vwpm.f_desde_pm <![CDATA[<=]]> to_date(#fecha_desde#,'yyyymmdd')
>
> OR vwpm.f_desde_pm <![CDATA[<=]]> to_date(#fecha_hasta#,'yyyymmdd')
>
> )
>
> AND (
>
> vwpm.f_hasta_pm <![CDATA[>=]]> to_date(#fecha_desde#,'yyyymmdd')
>
> OR vwpm.f_hasta_pm <![CDATA[>=]]> to_date(#fecha_hasta#,'yyyymmdd')
>
> )
>
> AND (
>
> vwpm.f_desde_cpf <![CDATA[<=]]> to_date(#fecha_desde#,'yyyymmdd')
>
> OR vwpm.f_desde_cpf <![CDATA[<=]]> to_date(#fecha_hasta#,'yyyymmdd')
>
> )
>
> AND(
>
> vwpm.f_hasta_cpf <![CDATA[>=]]> to_date(#fecha_desde#,'yyyymmdd')
>
> OR vwpm.f_hasta_cpf <![CDATA[>=]]> to_date(#fecha_hasta#,'yyyymmdd')
>
> )
>
> AND (
>
> vwpm.f_desde_apmpf <![CDATA[<=]]> to_date(#fecha_desde#,'yyyymmdd')
>
> OR vwpm.f_desde_apmpf <![CDATA[<=]]> to_date(#fecha_hasta#,'yyyymmdd')
>
> )
>
> AND (
>
> vwpm.f_hasta_apmpf <![CDATA[>=]]> to_date(#fecha_desde#,'yyyymmdd')
>
> OR vwpm.f_hasta_apmpf <![CDATA[>=]]> to_date(#fecha_hasta#,'yyyymmdd')
>
> )
>
> AND (
>
> vwpm.f_desde_cpm <![CDATA[<=]]> to_date(#fecha_desde#,'yyyymmdd')
>
> OR vwpm.f_desde_cpm <![CDATA[<=]]> to_date(#fecha_hasta#,'yyyymmdd')
>
> )
>
> AND (
>
> vwpm.f_hasta_cpm <![CDATA[>=]]> to_date(#fecha_desde#,'yyyymmdd')
>
> OR vwpm.f_hasta_cpm <![CDATA[>=]]> to_date(#fecha_hasta#,'yyyymmdd')
>
> )
>
> AND (
>
> vwpm.f_desde_cpma <![CDATA[<=]]> to_date(#fecha_desde#,'yyyymmdd')
>
> OR vwpm.f_desde_cpma <![CDATA[<=]]> to_date(#fecha_hasta#,'yyyymmdd')
>
> )
>
> AND (
>
> vwpm.f_hasta_cpma <![CDATA[>=]]> to_date(#fecha_desde#,'yyyymmdd')
>
> OR vwpm.f_hasta_cpma <![CDATA[>=]]> to_date(#fecha_hasta#,'yyyymmdd')
>
> )
>
> AND (
>
> vwpm.f_desde_tc <![CDATA[<=]]> to_date(#fecha_desde#,'yyyymmdd')
>
> OR vwpm.f_desde_tc <![CDATA[<=]]> to_date(#fecha_hasta#,'yyyymmdd')
>
> )
>
> AND (
>
> vwpm.f_hasta_tc <![CDATA[>=]]> to_date(#fecha_desde#,'yyyymmdd')
>
> OR vwpm.f_hasta_tc <![CDATA[>=]]> to_date(#fecha_hasta#,'yyyymmdd')
>
> )
>
> </sql>
>
> <select id="obtenerCurvas" resultMap="curvaHorariaResult"
> parameterClass="curvaHoraria">
>
> SELECT distinct(guid_pm), fecha, valor_h01, valor_h02, valor_h03,
> valor_h04, valor_h05, valor_h06, valor_h07,
>
> valor_h08, valor_h09, valor_h10, valor_h11, valor_h12, valor_h13,
> valor_h14, valor_h15, valor_h16, valor_h17,
>
> valor_h18, valor_h19, valor_h20, valor_h21, valor_h22, valor_h23,
> valor_h24, valor_h25
>
> from FLUMEN.vw_puntos_medida_ve vwpm, flumen.variables_periodo vp,
> flumen.periodovar p
>
> where vwpm.id_ccaa = vp.id_sitio
>
> and substr(vwpm.tarifa, 1, 1) = substr(vp.tarifa, 1, 1)
>
> and vp.id_var = p.id_var
>
> and p.fecha <![CDATA[>=]]> #fecha_desde#
>
> and p.fecha <![CDATA[<=]]> #fecha_hasta#
>
> AND
>
> <include refid="fragmento_fechas"/>
>
> order by guid_pm, fecha
>
> </select>
>
> <select id="obtenerPMs" resultClass="java.lang.String"
> parameterClass="curvaHoraria">
>
> select distinct(guid_pm) from FLUMEN.vw_puntos_medida_ve vwpm
>
> WHERE
>
> <include refid="fragmento_fechas"/>
>
> </select>
>
> </sqlMap>
>
> 
>
>
>
>
>
>
>
>
>
>
>
>
> ------------------------------------------------------------------
> This e-mail and the documents attached are confidential and intended
> solely
> for the addressee; it may also be privileged. If you receive this
> e-mail
> in error, please notify the sender immediately and destroy it.
> As its integrity cannot be secured on the Internet, the Atos Origin
> group
> liability cannot be triggered for the message content. Although the
> sender endeavours to maintain a computer virus-free network, the
> sender does
> not warrant that this transmission is virus-free and will not be
> liable for
> any damages resulting from any virus transmitted.
>
> Este mensaje y los ficheros adjuntos pueden contener informacion
> confidencial destinada solamente a la(s) persona(s) mencionadas
> anteriormente. Pueden estar protegidos por secreto profesional Si
> usted
> recibe este correo electronico por error, gracias de informar
> inmediatamente
> al remitente y destruir el mensaje.
> Al no estar asegurada la integridad de este mensaje sobre la red, Atos
> Origin no se hace responsable por su contenido. Su contenido no
> constituye
> ningun compromiso para el grupo Atos Origin, salvo ratificacion
> escrita por
> ambas partes.
> Aunque se esfuerza al maximo por mantener su red libre de virus, el
> emisor
> no puede garantizar nada al respecto y no sera responsable de
> cualesquiera
> danos que puedan resultar de una transmision de virus
> ------------------------------------------------------------------
>




------------------------------------------------------------------
This e-mail and the documents attached are confidential and intended solely
for the addressee; it may also be privileged. If you receive this e-mail
in error, please notify the sender immediately and destroy it.
As its integrity cannot be secured on the Internet, the Atos Origin group
liability cannot be triggered for the message content. Although the
sender endeavours to maintain a computer virus-free network, the sender does
not warrant that this transmission is virus-free and will not be liable for
any damages resulting from any virus transmitted.

Este mensaje y los ficheros adjuntos pueden contener informacion
confidencial destinada solamente a la(s) persona(s) mencionadas
anteriormente. Pueden estar protegidos por secreto profesional Si usted
recibe este correo electronico por error, gracias de informar inmediatamente
al remitente y destruir el mensaje.
Al no estar asegurada la integridad de este mensaje sobre la red, Atos
Origin no se hace responsable por su contenido. Su contenido no constituye
ningun compromiso para el grupo Atos Origin, salvo ratificacion escrita por
ambas partes.
Aunque se esfuerza al maximo por mantener su red libre de virus, el emisor
no puede garantizar nada al respecto y no sera responsable de cualesquiera
danos que puedan resultar de una transmision de virus
------------------------------------------------------------------


RE: poor performance

Posted by Gerardo Corro Fuentes <ge...@mundivia.net>.
Hi, 
 
I must download big portions of data, the queries that work properly do that with no problems at all. Next I'm attaching a JDBC class that retrieves the data in three seconds, and after that comes the logs that show how ibatis takes more than two minutes to do the same.
 
Thanks a lot!!!
 
package test;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import org.apache.commons.dbcp.BasicDataSource;
import com.mundivia.flumen.db.common.FactoriaSpring;
public class QueryTest {
 public static void main(String args[]) throws SQLException{

  
  BasicDataSource ds = (BasicDataSource) FactoriaSpring.getApplicationContext().getBean("dataSource");
  Connection con = ds.getConnection();
  Statement stmt = con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,
    ResultSet.CONCUR_READ_ONLY);
  
  long start = System.currentTimeMillis();
  
  
  ResultSet srs = stmt.executeQuery("SELECT distinct(guid_pm), fecha, valor_h01, valor_h02, valor_h03, valor_h04, valor_h05, valor_h06, valor_h07, " + 
    "valor_h08, valor_h09, valor_h10, valor_h11, valor_h12, valor_h13, valor_h14, valor_h15, valor_h16, valor_h17, " +
    "valor_h18, valor_h19, valor_h20, valor_h21, valor_h22, valor_h23, valor_h24, valor_h25 " +
    "from FLUMEN.vw_puntos_medida_ve vwpm, flumen.variables_periodo vp, flumen.periodovar p " +
    "where vwpm.id_ccaa = vp.id_sitio " +
    "and substr(vwpm.tarifa, 1, 1) = substr(vp.tarifa, 1, 1) " +
    "and vp.id_var = p.id_var " +
    "and p.fecha >= '20071001' " +
    "and p.fecha <= '20071031' " +
    "AND " +
    "                      ( " +
    "                       vwpm.f_desde_pf <= to_date('20071001','yyyymmdd') " +
    "                       OR vwpm.f_desde_pf <= to_date('20071031','yyyymmdd') " +
    "          )    " +                              
    "  AND ( " +
    "              vwpm.f_hasta_pf >= to_date('20071001','yyyymmdd') " +
    "              OR vwpm.f_hasta_pf >= to_date('20071031','yyyymmdd') " +
    "  ) " +
    "  AND ( " +
    "                       vwpm.f_desde_pm <= to_date('20071001','yyyymmdd') " +
    "                       OR vwpm.f_desde_pm <= to_date('20071031','yyyymmdd') " +
    "  ) " +
    "  AND ( " +
    "                      vwpm.f_hasta_pm >= to_date('20071001','yyyymmdd') " +
    "                      OR vwpm.f_hasta_pm >= to_date('20071031','yyyymmdd') " +
    "  ) " +
    "  AND ( " +
    "                       vwpm.f_desde_cpf <= to_date('20071001','yyyymmdd') " +
    "                       OR vwpm.f_desde_cpf <= to_date('20071031','yyyymmdd') " +
    "  ) " +
    " AND( " +
    "                       vwpm.f_hasta_cpf >= to_date('20071001','yyyymmdd') " +
    "                       OR vwpm.f_hasta_cpf >= to_date('20071031','yyyymmdd') " +
    " )" +
    "  AND  ( " +
    "                       vwpm.f_desde_apmpf <= to_date('20071001','yyyymmdd') " +
    "                       OR vwpm.f_desde_apmpf <= to_date('20071031','yyyymmdd') " +
    " ) " +
    "  AND ( " +
    "                       vwpm.f_hasta_apmpf >= to_date('20071001','yyyymmdd') " +
    "                       OR vwpm.f_hasta_apmpf >= to_date('20071031','yyyymmdd') " +
    "  ) " +
    "  AND ( " +
    "                       vwpm.f_desde_cpm <= to_date('20071001','yyyymmdd') " +
    "                       OR vwpm.f_desde_cpm <= to_date('20071031','yyyymmdd') " +
    "  ) " +
    "  AND ( " +
    "                       vwpm.f_hasta_cpm >= to_date('20071001','yyyymmdd') " +
    "                       OR vwpm.f_hasta_cpm >= to_date('20071031','yyyymmdd') " +
    "  ) " +
    "  AND ( " +
    "                       vwpm.f_desde_cpma <= to_date('20071001','yyyymmdd') " +
    "                       OR vwpm.f_desde_cpma <= to_date('20071031','yyyymmdd') " +
    "  ) " +
    "  AND ( " +
    "                       vwpm.f_hasta_cpma >= to_date('20071001','yyyymmdd') " +
    "                       OR vwpm.f_hasta_cpma >= to_date('20071031','yyyymmdd') " +
    " ) " +
    " AND ( " +
    "                       vwpm.f_desde_tc <= to_date('20071001','yyyymmdd') " + 
    "                       OR vwpm.f_desde_tc <= to_date('20071031','yyyymmdd') " +
    "  ) " +
    "  AND ( " + 
    "                       vwpm.f_hasta_tc >= to_date('20071001','yyyymmdd') " +
    "                       OR vwpm.f_hasta_tc >= to_date('20071031','yyyymmdd') " +
    "  ) " +
  " order by guid_pm, fecha ");
  while (srs.next()) {
   //System.out.print("\nObtengo pm: " + srs.getString(1));
  }
  
  System.out.print("Se tardó: " +  (System.currentTimeMillis()-start));
 }
}
 
 
The logs are:
 
[main] INFO - Loading XML bean definitions from class path resource [applicationContext-dao.xml]

[main] INFO - Loading XML bean definitions from class path resource [applicationContext-dao-transacciones.xml]

[main] INFO - Loading XML bean definitions from class path resource [applicationContext-service.xml]

[main] INFO - Bean factory for application context [org.springframework.context.support.ClassPathXmlApplicationContext;hashCode=19475750]: org.springframework.beans.factory.support.DefaultListableBeanFactory defining beans [sqlMapClientTemplate,Prelacion0DAOTarget,Prelacion1DAOTarget,Prelacion2DAOTarget,Prelacion3DAOTarget,CalculoMVHDAOTarget,Prelacion4DAOTarget,Prelacion6DAOTarget,Prelacion7DAOTarget,Prelacion8DAOTarget,AltaMVHDAOTarget,propertyConfigurer,sqlMapClient,dataSource,Prelacion0DAO,Prelacion1DAO,Prelacion2DAO,Prelacion3DAO,Prelacion4DAO,Prelacion6DAO,Prelacion7DAO,Prelacion8DAO,CalculoMVHDAO,AltaMVHDAO,transactionManager,defaultTxAttributes,Prelacion0ServicioTarget,Prelacion1ServicioTarget,Prelacion2ServicioTarget,Prelacion3ServicioTarget,CurvaHorariaServicioTarget,Prelacion4ServicioTarget,Prelacion6ServicioTarget,Prelacion7ServicioTarget,Prelacion8ServicioTarget,AltaMVHServicioTarget,Prelacion0Servicio,Prelacion1Servicio,Prelacion2Servicio,Prelacion3Servicio,Prelacion4Servicio,Prelacion6Servicio,Prelacion7Servicio,Prelacion8Servicio,AltaMVHServicio,CurvaHorariaServicio]; root of BeanFactory hierarchy

[main] INFO - 46 beans defined in application context [org.springframework.context.support.ClassPathXmlApplicationContext;hashCode=19475750]

[main] INFO - Creating shared instance of singleton bean 'propertyConfigurer'

[main] INFO - Loading properties from class path resource [database.properties]

[main] INFO - JDK 1.4+ collections available

[main] INFO - Commons Collections 3.x available

[main] INFO - Unable to locate MessageSource with name 'messageSource': using default [org.springframework.context.support.DelegatingMessageSource@82764b]

[main] INFO - Unable to locate ApplicationEventMulticaster with name 'applicationEventMulticaster': using default [org.springframework.context.event.SimpleApplicationEventMulticaster@1bf3d87]

[main] INFO - Pre-instantiating singletons in factory [org.springframework.beans.factory.support.DefaultListableBeanFactory defining beans [sqlMapClientTemplate,Prelacion0DAOTarget,Prelacion1DAOTarget,Prelacion2DAOTarget,Prelacion3DAOTarget,CalculoMVHDAOTarget,Prelacion4DAOTarget,Prelacion6DAOTarget,Prelacion7DAOTarget,Prelacion8DAOTarget,AltaMVHDAOTarget,propertyConfigurer,sqlMapClient,dataSource,Prelacion0DAO,Prelacion1DAO,Prelacion2DAO,Prelacion3DAO,Prelacion4DAO,Prelacion6DAO,Prelacion7DAO,Prelacion8DAO,CalculoMVHDAO,AltaMVHDAO,transactionManager,defaultTxAttributes,Prelacion0ServicioTarget,Prelacion1ServicioTarget,Prelacion2ServicioTarget,Prelacion3ServicioTarget,CurvaHorariaServicioTarget,Prelacion4ServicioTarget,Prelacion6ServicioTarget,Prelacion7ServicioTarget,Prelacion8ServicioTarget,AltaMVHServicioTarget,Prelacion0Servicio,Prelacion1Servicio,Prelacion2Servicio,Prelacion3Servicio,Prelacion4Servicio,Prelacion6Servicio,Prelacion7Servicio,Prelacion8Servicio,AltaMVHServicio,CurvaHorariaServicio]; root of BeanFactory hierarchy]

[main] INFO - Creating shared instance of singleton bean 'sqlMapClientTemplate'

[main] INFO - Creating shared instance of singleton bean 'sqlMapClient'

[main] INFO - Creating shared instance of singleton bean 'dataSource'

[main] INFO - Creating shared instance of singleton bean 'Prelacion0DAOTarget'

[main] INFO - Creating shared instance of singleton bean 'Prelacion1DAOTarget'

[main] INFO - Creating shared instance of singleton bean 'Prelacion2DAOTarget'

[main] INFO - Creating shared instance of singleton bean 'Prelacion3DAOTarget'

[main] INFO - Creating shared instance of singleton bean 'CalculoMVHDAOTarget'

[main] INFO - Creating shared instance of singleton bean 'Prelacion4DAOTarget'

[main] INFO - Creating shared instance of singleton bean 'Prelacion6DAOTarget'

[main] INFO - Creating shared instance of singleton bean 'Prelacion7DAOTarget'

[main] INFO - Creating shared instance of singleton bean 'Prelacion8DAOTarget'

[main] INFO - Creating shared instance of singleton bean 'AltaMVHDAOTarget'

[main] INFO - Creating shared instance of singleton bean 'Prelacion0DAO'

[main] INFO - CGLIB2 not available: proxyTargetClass feature disabled

[main] INFO - Creating shared instance of singleton bean 'transactionManager'

[main] INFO - Creating shared instance of singleton bean 'defaultTxAttributes'

[main] INFO - Creating shared instance of singleton bean 'Prelacion1DAO'

[main] INFO - Creating shared instance of singleton bean 'Prelacion2DAO'

[main] INFO - Creating shared instance of singleton bean 'Prelacion3DAO'

[main] INFO - Creating shared instance of singleton bean 'Prelacion4DAO'

[main] INFO - Creating shared instance of singleton bean 'Prelacion6DAO'

[main] INFO - Creating shared instance of singleton bean 'Prelacion7DAO'

[main] INFO - Creating shared instance of singleton bean 'Prelacion8DAO'

[main] INFO - Creating shared instance of singleton bean 'CalculoMVHDAO'

[main] INFO - Creating shared instance of singleton bean 'AltaMVHDAO'

[main] INFO - Creating shared instance of singleton bean 'Prelacion0Servicio'

[main] INFO - Creating shared instance of singleton bean 'Prelacion1Servicio'

[main] INFO - Creating shared instance of singleton bean 'Prelacion2Servicio'

[main] INFO - Creating shared instance of singleton bean 'Prelacion3Servicio'

[main] INFO - Creating shared instance of singleton bean 'Prelacion4Servicio'

[main] INFO - Creating shared instance of singleton bean 'Prelacion6Servicio'

[main] INFO - Creating shared instance of singleton bean 'Prelacion7Servicio'

[main] INFO - Creating shared instance of singleton bean 'Prelacion8Servicio'

[main] INFO - Creating shared instance of singleton bean 'AltaMVHServicio'

[main] INFO - Creating shared instance of singleton bean 'CurvaHorariaServicio'

[main] INFO - JDBC 3.0 Savepoint class is available

[main] DEBUG - Using transaction object [org.springframework.jdbc.datasource.DataSourceTransactionManager$DataSourceTransactionObject@187c55c]

[main] INFO - Prelacion1ServicioImpl:buscarPrelacion0 ...se van a buscar los datos para prelacion 0

[main] DEBUG - Using transaction object [org.springframework.jdbc.datasource.DataSourceTransactionManager$DataSourceTransactionObject@b02928]

[main] DEBUG - Executing action directly on SqlMapClient

[main] DEBUG - Opening JDBC Connection

[main] DEBUG - Registering transaction synchronization for JDBC Connection

[main] DEBUG - {conn-100000} Connection

[main] DEBUG - {conn-100000} Preparing Statement: select distinct(guid_pm) from FLUMEN.vw_puntos_medida_ve vwpm WHERE ( vwpm.f_desde_pf <= to_date(?,'yyyymmdd') OR vwpm.f_desde_pf <= to_date(?,'yyyymmdd') ) AND ( vwpm.f_hasta_pf >= to_date(?,'yyyymmdd') OR vwpm.f_hasta_pf >= to_date(?,'yyyymmdd') ) AND ( vwpm.f_desde_pm <= to_date(?,'yyyymmdd') OR vwpm.f_desde_pm <= to_date(?,'yyyymmdd') ) AND ( vwpm.f_hasta_pm >= to_date(?,'yyyymmdd') OR vwpm.f_hasta_pm >= to_date(?,'yyyymmdd') ) AND ( vwpm.f_desde_cpf <= to_date(?,'yyyymmdd') OR vwpm.f_desde_cpf <= to_date(?,'yyyymmdd') ) AND( vwpm.f_hasta_cpf >= to_date(?,'yyyymmdd') OR vwpm.f_hasta_cpf >= to_date(?,'yyyymmdd') ) AND ( vwpm.f_desde_apmpf <= to_date(?,'yyyymmdd') OR vwpm.f_desde_apmpf <= to_date(?,'yyyymmdd') ) AND ( vwpm.f_hasta_apmpf >= to_date(?,'yyyymmdd') OR vwpm.f_hasta_apmpf >= to_date(?,'yyyymmdd') ) AND ( vwpm.f_desde_cpm <= to_date(?,'yyyymmdd') OR vwpm.f_desde_cpm <= to_date(?,'yyyymmdd') ) AND ( vwpm.f_hasta_cpm >= to_date(?,'yyyymmdd') OR vwpm.f_hasta_cpm >= to_date(?,'yyyymmdd') ) AND ( vwpm.f_desde_cpma <= to_date(?,'yyyymmdd') OR vwpm.f_desde_cpma <= to_date(?,'yyyymmdd') ) AND ( vwpm.f_hasta_cpma >= to_date(?,'yyyymmdd') OR vwpm.f_hasta_cpma >= to_date(?,'yyyymmdd') ) AND ( vwpm.f_desde_tc <= to_date(?,'yyyymmdd') OR vwpm.f_desde_tc <= to_date(?,'yyyymmdd') ) AND ( vwpm.f_hasta_tc >= to_date(?,'yyyymmdd') OR vwpm.f_hasta_tc >= to_date(?,'yyyymmdd') ) 

[main] DEBUG - {pstm-100001} Executing Statement: select distinct(guid_pm) from FLUMEN.vw_puntos_medida_ve vwpm WHERE ( vwpm.f_desde_pf <= to_date(?,'yyyymmdd') OR vwpm.f_desde_pf <= to_date(?,'yyyymmdd') ) AND ( vwpm.f_hasta_pf >= to_date(?,'yyyymmdd') OR vwpm.f_hasta_pf >= to_date(?,'yyyymmdd') ) AND ( vwpm.f_desde_pm <= to_date(?,'yyyymmdd') OR vwpm.f_desde_pm <= to_date(?,'yyyymmdd') ) AND ( vwpm.f_hasta_pm >= to_date(?,'yyyymmdd') OR vwpm.f_hasta_pm >= to_date(?,'yyyymmdd') ) AND ( vwpm.f_desde_cpf <= to_date(?,'yyyymmdd') OR vwpm.f_desde_cpf <= to_date(?,'yyyymmdd') ) AND( vwpm.f_hasta_cpf >= to_date(?,'yyyymmdd') OR vwpm.f_hasta_cpf >= to_date(?,'yyyymmdd') ) AND ( vwpm.f_desde_apmpf <= to_date(?,'yyyymmdd') OR vwpm.f_desde_apmpf <= to_date(?,'yyyymmdd') ) AND ( vwpm.f_hasta_apmpf >= to_date(?,'yyyymmdd') OR vwpm.f_hasta_apmpf >= to_date(?,'yyyymmdd') ) AND ( vwpm.f_desde_cpm <= to_date(?,'yyyymmdd') OR vwpm.f_desde_cpm <= to_date(?,'yyyymmdd') ) AND ( vwpm.f_hasta_cpm >= to_date(?,'yyyymmdd') OR vwpm.f_hasta_cpm >= to_date(?,'yyyymmdd') ) AND ( vwpm.f_desde_cpma <= to_date(?,'yyyymmdd') OR vwpm.f_desde_cpma <= to_date(?,'yyyymmdd') ) AND ( vwpm.f_hasta_cpma >= to_date(?,'yyyymmdd') OR vwpm.f_hasta_cpma >= to_date(?,'yyyymmdd') ) AND ( vwpm.f_desde_tc <= to_date(?,'yyyymmdd') OR vwpm.f_desde_tc <= to_date(?,'yyyymmdd') ) AND ( vwpm.f_hasta_tc >= to_date(?,'yyyymmdd') OR vwpm.f_hasta_tc >= to_date(?,'yyyymmdd') ) 

[main] DEBUG - {pstm-100001} Parameters: [20071001, 20071030, 20071001, 20071030, 20071001, 20071030, 20071001, 20071030, 20071001, 20071030, 20071001, 20071030, 20071001, 20071030, 20071001, 20071030, 20071001, 20071030, 20071001, 20071030, 20071001, 20071030, 20071001, 20071030, 20071001, 20071030, 20071001, 20071030]

[main] DEBUG - {pstm-100001} Types: [java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String]

[main] DEBUG - {rset-100002} ResultSet

[main] DEBUG - {rset-100002} Header: [GUID_PM]

[main] DEBUG - {rset-100002} Result: [7322]

[main] DEBUG - {rset-100002} Result: [7305]

[main] DEBUG - {rset-100002} Result: [1270102]

[main] DEBUG - {rset-100002} Result: [7298]

[main] DEBUG - {rset-100002} Result: [1284195]

[main] DEBUG - {rset-100002} Result: [1285724]

[main] DEBUG - {rset-100002} Result: [7539]

[main] DEBUG - {rset-100002} Result: [1309723]

[main] DEBUG - {rset-100002} Result: [1285091]

[main] DEBUG - {rset-100002} Result: [1323673]

[main] DEBUG - {rset-100002} Result: [1284043]

[main] DEBUG - {rset-100002} Result: [1283520]

[main] DEBUG - {rset-100002} Result: [38286]

[main] DEBUG - {rset-100002} Result: [1297556]

[main] DEBUG - {rset-100002} Result: [7542]

[main] DEBUG - {rset-100002} Result: [49352]

[main] DEBUG - {rset-100002} Result: [1305525]

[main] DEBUG - {rset-100002} Result: [1317347]

[main] DEBUG - {rset-100002} Result: [1297637]

[main] DEBUG - {rset-100002} Result: [1314151]

[main] DEBUG - {rset-100002} Result: [1324687]

[main] DEBUG - {rset-100002} Result: [1297583]

[main] DEBUG - {rset-100002} Result: [1297565]

[main] DEBUG - {rset-100002} Result: [1270186]

[main] DEBUG - {rset-100002} Result: [7300]

[main] DEBUG - {rset-100002} Result: [7294]

[main] DEBUG - {rset-100002} Result: [1314597]

[main] DEBUG - {rset-100002} Result: [1297855]

[main] DEBUG - {rset-100002} Result: [1314514]

[main] DEBUG - {rset-100002} Result: [1297619]

[main] DEBUG - {rset-100002} Result: [1305437]

[main] DEBUG - {rset-100002} Result: [1297437]

[main] DEBUG - {rset-100002} Result: [54124]

[main] DEBUG - {rset-100002} Result: [1306645]

[main] DEBUG - {rset-100002} Result: [1184876]

[main] DEBUG - {rset-100002} Result: [57808]

[main] DEBUG - {rset-100002} Result: [7471]

[main] DEBUG - {rset-100002} Result: [7520]

[main] DEBUG - {rset-100002} Result: [1322275]

[main] DEBUG - {rset-100002} Result: [1312879]

[main] DEBUG - {rset-100002} Result: [1312870]

[main] DEBUG - {rset-100002} Result: [1297497]

[main] DEBUG - {rset-100002} Result: [1297574]

[main] DEBUG - {rset-100002} Result: [1287044]

[main] DEBUG - {rset-100002} Result: [1314133]

[main] DEBUG - {rset-100002} Result: [1309732]

[main] DEBUG - {rset-100002} Result: [1314169]

[main] DEBUG - {rset-100002} Result: [58574]

[main] DEBUG - {rset-100002} Result: [1285781]

[main] DEBUG - {rset-100002} Result: [1297646]

[main] DEBUG - {rset-100002} Result: [7519]

[main] DEBUG - {rset-100002} Result: [1198695]

[main] DEBUG - {rset-100002} Result: [1306636]

[main] DEBUG - {rset-100002} Result: [48449]

[main] DEBUG - {rset-100002} Result: [1297628]

[main] DEBUG - {rset-100002} Result: [7522]

[main] DEBUG - {rset-100002} Result: [48738]

[main] DEBUG - {rset-100002} Result: [1270084]

[main] DEBUG - {rset-100002} Result: [1297419]

[main] DEBUG - {rset-100002} Result: [1314615]

[main] DEBUG - {rset-100002} Result: [1314606]

[main] DEBUG - {rset-100002} Result: [1313946]

[main] DEBUG - {rset-100002} Result: [1331045]

[main] DEBUG - {rset-100002} Result: [7469]

[main] DEBUG - {rset-100002} Result: [7283]

[main] DEBUG - {rset-100002} Result: [1297713]

[main] DEBUG - {rset-100002} Result: [1314550]

[main] DEBUG - {rset-100002} Result: [1324705]

[main] DEBUG - {rset-100002} Result: [1324669]

[main] DEBUG - {rset-100002} Result: [58584]

[main] DEBUG - {rset-100002} Result: [1305265]

[main] DEBUG - {rset-100002} Result: [1297683]

[main] DEBUG - {rset-100002} Result: [1312915]

[main] DEBUG - {rset-100002} Result: [1314142]

[main] DEBUG - {rset-100002} Result: [1297704]

[main] DEBUG - {rset-100002} Result: [1298358]

[main] DEBUG - {rset-100002} Result: [1297488]

[main] DEBUG - {rset-100002} Result: [1314541]

[main] DEBUG - {rset-100002} Result: [1324678]

[main] DEBUG - {rset-100002} Result: [57836]

[main] DEBUG - {rset-100002} Result: [57843]

[main] DEBUG - {rset-100002} Result: [1283553]

[main] DEBUG - {rset-100002} Result: [1286950]

[main] DEBUG - {rset-100002} Result: [7326]

[main] DEBUG - {rset-100002} Result: [7308]

[main] DEBUG - {rset-100002} Result: [1283436]

[main] DEBUG - {rset-100002} Result: [1285149]

[main] DEBUG - {rset-100002} Result: [1324273]

[main] DEBUG - {rset-100002} Result: [1285837]

[main] DEBUG - {rset-100002} Result: [1305880]

[main] DEBUG - {rset-100002} Result: [1204464]

[main] DEBUG - {rset-100002} Result: [7521]

[main] DEBUG - {rset-100002} Result: [7285]

[main] DEBUG - {rset-100002} Result: [1314523]

[main] DEBUG - {rset-100002} Result: [1314160]

[main] DEBUG - {rset-100002} Result: [1306244]

[main] DEBUG - {rset-100002} Result: [1296858]

[main] DEBUG - {rset-100002} Result: [48429]

[main] DEBUG - {rset-100002} Result: [1306169]

[main] DEBUG - {rset-100002} Result: [1285695]

[main] DEBUG - {rset-100002} Result: [1305274]

[main] DEBUG - {rset-100002} Result: [1306474]

[main] DEBUG - {rset-100002} Result: [6889]

[main] DEBUG - {rset-100002} Result: [1319257]

[main] DEBUG - {rset-100002} Result: [1324696]

[main] DEBUG - {rset-100002} Result: [7320]

[main] DEBUG - {rset-100002} Result: [1297524]

[main] DEBUG - {rset-100002} Result: [1270156]

[main] DEBUG - {rset-100002} Result: [7553]

[main] DEBUG - {rset-100002} Result: [1305552]

[main] DEBUG - {rset-100002} Result: [6877]

[main] DEBUG - {rset-100002} Result: [1195746]

[main] DEBUG - {rset-100002} Result: [26265]

[main] DEBUG - {rset-100002} Result: [1314178]

[main] DEBUG - {rset-100002} Result: [1314851]

[main] DEBUG - {rset-100002} Result: [1312906]

[main] DEBUG - {rset-100002} Result: [54089]

[main] DEBUG - {rset-100002} Result: [6871]

[main] DEBUG - {rset-100002} Result: [48388]

[main] DEBUG - {rset-100002} Result: [1324723]

[main] DEBUG - {rset-100002} Result: [1312897]

[main] DEBUG - {rset-100002} Result: [1285503]

[main] DEBUG - {rset-100002} Result: [1314633]

[main] DEBUG - {rset-100002} Result: [1306160]

[main] DEBUG - {rset-100002} Result: [1198656]

[main] DEBUG - {rset-100002} Result: [1297695]

[main] DEBUG - {rset-100002} Result: [7307]

[main] DEBUG - {rset-100002} Result: [1285850]

[main] DEBUG - {rset-100002} Result: [1198704]

[main] DEBUG - {rset-100002} Result: [1312888]

[main] DEBUG - {rset-100002} Result: [1296918]

[main] DEBUG - {rset-100002} Result: [1305534]

[main] DEBUG - {rset-100002} Result: [1312993]

[main] DEBUG - {rset-100002} Result: [1285533]

[main] DEBUG - {rset-100002} Result: [1270138]

[main] DEBUG - {rset-100002} Result: [1319282]

[main] DEBUG - {rset-100002} Result: [7290]

[main] DEBUG - {rset-100002} Result: [7289]

[main] DEBUG - {rset-100002} Result: [38291]

[main] DEBUG - {rset-100002} Result: [7541]

[main] DEBUG - {rset-100002} Result: [7287]

[main] DEBUG - {rset-100002} Result: [7284]

[main] DEBUG - {rset-100002} Result: [1297610]

[main] DEBUG - {rset-100002} Result: [1314532]

[main] DEBUG - {rset-100002} Result: [6981]

[main] DEBUG - {rset-100002} Result: [1324714]

[main] DEBUG - {rset-100002} Result: [1305650]

[main] DEBUG - {rset-100002} Result: [1312933]

[main] DEBUG - {rset-100002} Result: [48439]

[main] DEBUG - {rset-100002} Result: [1022538]

[main] DEBUG - {rset-100002} Result: [1285512]

[main] DEBUG - {rset-100002} Result: [1024146]

[main] DEBUG - {rset-100002} Result: [1024231]

[main] DEBUG - {rset-100002} Result: [1306483]

[main] DEBUG - {rset-100002} Result: [1285521]

[main] DEBUG - {rset-100002} Result: [1285862]

[main] DEBUG - {rset-100002} Result: [7327]

[main] DEBUG - {rset-100002} Result: [7301]

[main] DEBUG - {rset-100002} Result: [45626]

[main] DEBUG - {rset-100002} Result: [1314496]

[main] DEBUG - {rset-100002} Result: [1306253]

[main] DEBUG - {rset-100002} Result: [1285661]

[main] DEBUG - {rset-100002} Result: [1297601]

[main] DEBUG - {rset-100002} Result: [1314505]

[main] DEBUG - {rset-100002} Result: [1309714]

[main] DEBUG - {rset-100002} Result: [1305871]

[main] DEBUG - {rset-100002} Result: [1283382]

[main] DEBUG - {rset-100002} Result: [1324282]

[main] DEBUG - {rset-100002} Result: [1283403]

[main] DEBUG - {rset-100002} Result: [7288]

[main] DEBUG - {rset-100002} Result: [1284896]

[main] DEBUG - {rset-100002} Result: [1305862]

[main] DEBUG - {rset-100002} Result: [1312924]

[main] DEBUG - {rset-100002} Result: [1313005]

[main] DEBUG - {rset-100002} Result: [1198679]

[main] DEBUG - {rset-100002} Result: [1317239]

[main] DEBUG - {rset-100002} Result: [45565]

[main] DEBUG - {rset-100002} Result: [1296867]

[main] DEBUG - {rset-100002} Result: [49382]

[main] DEBUG - {rset-100002} Result: [1324264]

[main] DEBUG - {rset-100002} Result: [1294962]

[main] DEBUG - {rset-100002} Result: [1317338]

[main] DEBUG - {rset-100002} Result: [1314624]

[main] DEBUG - {rset-100002} Result: [38296]

[main] DEBUG - {rset-100002} Result: [7306]

[main] DEBUG - {rset-100002} Result: [1270120]

[main] DEBUG - {rset-100002} Result: [1321174]

[main] DEBUG - {rset-100002} Result: [1270198]

[main] DEBUG - {rset-100002} Result: [1283364]

[main] DEBUG - {rset-100002} Result: [7316]

[main] DEBUG - {rset-100002} Result: [7302]

[main] DEBUG - {rset-100002} Result: [7295]

[main] DEBUG - {rset-100002} Result: [6876]

[main] DEBUG - {rset-100002} Result: [26260]

[main] DEBUG - {rset-100002} Result: [1297674]

[main] DEBUG - {rset-100002} Result: [1196863]

[main] DEBUG - {rset-100002} Result: [1314735]

[main] DEBUG - {rset-100002} Result: [1285736]

[main] DEBUG - {rset-100002} Result: [1297428]

[main] DEBUG - {rset-100002} Result: [1195730]

[main] DEBUG - {rset-100002} Result: [1297365]

[main] DEBUG - {rset-100002} Result: [1293213]

[main] DEBUG - {rset-100002} Result: [1324294]

[main] DEBUG - {rset-100002} Result: [1324255]

[main] DEBUG - {rset-100002} Result: [1297547]

[main] DEBUG - {rset-100002} Result: [1305453]

[main] DEBUG - {rset-100002} Result: [7540]

[main] DEBUG - {rset-100002} Result: [1285359]

[main] DEBUG - {rset-100002} Result: [1283583]

[main] DEBUG - {rset-100002} Result: [1305543]

[main] DEBUG - {rset-100002} Result: [1297506]

[main] DEBUG - {rset-100002} Result: [1297592]

[main] DEBUG - {rset-100002} Result: [1022555]

[main] DEBUG - {rset-100002} Result: [58564]

[main] DEBUG - {rset-100002} Result: [1284878]

[main] DEBUG - {rset-100002} Result: [1306151]

[main] DEBUG - Triggering beforeCommit synchronization

[main] DEBUG - Triggering beforeCompletion synchronization

[main] DEBUG - Closing JDBC Connection

[main] DEBUG - Triggering afterCompletion synchronization

[main] DEBUG - Using transaction object [org.springframework.jdbc.datasource.DataSourceTransactionManager$DataSourceTransactionObject@221e9e]

[main] INFO - Prelacion1ServicioImpl:buscarPrelacion0 ...se van a buscar los datos para prelacion 0

[main] DEBUG - Using transaction object [org.springframework.jdbc.datasource.DataSourceTransactionManager$DataSourceTransactionObject@1264eab]

[main] DEBUG - Executing action directly on SqlMapClient

[main] DEBUG - Opening JDBC Connection

[main] DEBUG - Registering transaction synchronization for JDBC Connection

[main] DEBUG - {conn-100003} Connection

[main] DEBUG - {conn-100003} Preparing Statement: SELECT distinct(guid_pm), fecha, valor_h01, valor_h02, valor_h03, valor_h04, valor_h05, valor_h06, valor_h07, valor_h08, valor_h09, valor_h10, valor_h11, valor_h12, valor_h13, valor_h14, valor_h15, valor_h16, valor_h17, valor_h18, valor_h19, valor_h20, valor_h21, valor_h22, valor_h23, valor_h24, valor_h25 from FLUMEN.vw_puntos_medida_ve vwpm, flumen.variables_periodo vp, flumen.periodovar p where vwpm.id_ccaa = vp.id_sitio and substr(vwpm.tarifa, 1, 1) = substr(vp.tarifa, 1, 1) and vp.id_var = p.id_var and p.fecha >= ? and p.fecha <= ? AND ( vwpm.f_desde_pf <= to_date(?,'yyyymmdd') OR vwpm.f_desde_pf <= to_date(?,'yyyymmdd') ) AND ( vwpm.f_hasta_pf >= to_date(?,'yyyymmdd') OR vwpm.f_hasta_pf >= to_date(?,'yyyymmdd') ) AND ( vwpm.f_desde_pm <= to_date(?,'yyyymmdd') OR vwpm.f_desde_pm <= to_date(?,'yyyymmdd') ) AND ( vwpm.f_hasta_pm >= to_date(?,'yyyymmdd') OR vwpm.f_hasta_pm >= to_date(?,'yyyymmdd') ) AND ( vwpm.f_desde_cpf <= to_date(?,'yyyymmdd') OR vwpm.f_desde_cpf <= to_date(?,'yyyymmdd') ) AND( vwpm.f_hasta_cpf >= to_date(?,'yyyymmdd') OR vwpm.f_hasta_cpf >= to_date(?,'yyyymmdd') ) AND ( vwpm.f_desde_apmpf <= to_date(?,'yyyymmdd') OR vwpm.f_desde_apmpf <= to_date(?,'yyyymmdd') ) AND ( vwpm.f_hasta_apmpf >= to_date(?,'yyyymmdd') OR vwpm.f_hasta_apmpf >= to_date(?,'yyyymmdd') ) AND ( vwpm.f_desde_cpm <= to_date(?,'yyyymmdd') OR vwpm.f_desde_cpm <= to_date(?,'yyyymmdd') ) AND ( vwpm.f_hasta_cpm >= to_date(?,'yyyymmdd') OR vwpm.f_hasta_cpm >= to_date(?,'yyyymmdd') ) AND ( vwpm.f_desde_cpma <= to_date(?,'yyyymmdd') OR vwpm.f_desde_cpma <= to_date(?,'yyyymmdd') ) AND ( vwpm.f_hasta_cpma >= to_date(?,'yyyymmdd') OR vwpm.f_hasta_cpma >= to_date(?,'yyyymmdd') ) AND ( vwpm.f_desde_tc <= to_date(?,'yyyymmdd') OR vwpm.f_desde_tc <= to_date(?,'yyyymmdd') ) AND ( vwpm.f_hasta_tc >= to_date(?,'yyyymmdd') OR vwpm.f_hasta_tc >= to_date(?,'yyyymmdd') ) order by guid_pm, fecha 

[main] DEBUG - {pstm-100004} Executing Statement: SELECT distinct(guid_pm), fecha, valor_h01, valor_h02, valor_h03, valor_h04, valor_h05, valor_h06, valor_h07, valor_h08, valor_h09, valor_h10, valor_h11, valor_h12, valor_h13, valor_h14, valor_h15, valor_h16, valor_h17, valor_h18, valor_h19, valor_h20, valor_h21, valor_h22, valor_h23, valor_h24, valor_h25 from FLUMEN.vw_puntos_medida_ve vwpm, flumen.variables_periodo vp, flumen.periodovar p where vwpm.id_ccaa = vp.id_sitio and substr(vwpm.tarifa, 1, 1) = substr(vp.tarifa, 1, 1) and vp.id_var = p.id_var and p.fecha >= ? and p.fecha <= ? AND ( vwpm.f_desde_pf <= to_date(?,'yyyymmdd') OR vwpm.f_desde_pf <= to_date(?,'yyyymmdd') ) AND ( vwpm.f_hasta_pf >= to_date(?,'yyyymmdd') OR vwpm.f_hasta_pf >= to_date(?,'yyyymmdd') ) AND ( vwpm.f_desde_pm <= to_date(?,'yyyymmdd') OR vwpm.f_desde_pm <= to_date(?,'yyyymmdd') ) AND ( vwpm.f_hasta_pm >= to_date(?,'yyyymmdd') OR vwpm.f_hasta_pm >= to_date(?,'yyyymmdd') ) AND ( vwpm.f_desde_cpf <= to_date(?,'yyyymmdd') OR vwpm.f_desde_cpf <= to_date(?,'yyyymmdd') ) AND( vwpm.f_hasta_cpf >= to_date(?,'yyyymmdd') OR vwpm.f_hasta_cpf >= to_date(?,'yyyymmdd') ) AND ( vwpm.f_desde_apmpf <= to_date(?,'yyyymmdd') OR vwpm.f_desde_apmpf <= to_date(?,'yyyymmdd') ) AND ( vwpm.f_hasta_apmpf >= to_date(?,'yyyymmdd') OR vwpm.f_hasta_apmpf >= to_date(?,'yyyymmdd') ) AND ( vwpm.f_desde_cpm <= to_date(?,'yyyymmdd') OR vwpm.f_desde_cpm <= to_date(?,'yyyymmdd') ) AND ( vwpm.f_hasta_cpm >= to_date(?,'yyyymmdd') OR vwpm.f_hasta_cpm >= to_date(?,'yyyymmdd') ) AND ( vwpm.f_desde_cpma <= to_date(?,'yyyymmdd') OR vwpm.f_desde_cpma <= to_date(?,'yyyymmdd') ) AND ( vwpm.f_hasta_cpma >= to_date(?,'yyyymmdd') OR vwpm.f_hasta_cpma >= to_date(?,'yyyymmdd') ) AND ( vwpm.f_desde_tc <= to_date(?,'yyyymmdd') OR vwpm.f_desde_tc <= to_date(?,'yyyymmdd') ) AND ( vwpm.f_hasta_tc >= to_date(?,'yyyymmdd') OR vwpm.f_hasta_tc >= to_date(?,'yyyymmdd') ) order by guid_pm, fecha 

[main] DEBUG - {pstm-100004} Parameters: [20071001, 20071030, 20071001, 20071030, 20071001, 20071030, 20071001, 20071030, 20071001, 20071030, 20071001, 20071030, 20071001, 20071030, 20071001, 20071030, 20071001, 20071030, 20071001, 20071030, 20071001, 20071030, 20071001, 20071030, 20071001, 20071030, 20071001, 20071030, 20071001, 20071030]

[main] DEBUG - {pstm-100004} Types: [java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String]

[main] DEBUG - {rset-100005} ResultSet

[main] DEBUG - {rset-100005} Header: [guid_pm, fecha, valor_h01, valor_h02, valor_h03, valor_h04, valor_h05, valor_h06, valor_h07, valor_h08, valor_h09, valor_h10, valor_h11, valor_h12, valor_h13, valor_h14, valor_h15, valor_h16, valor_h17, valor_h18, valor_h19, valor_h20, valor_h21, valor_h22, valor_h23, valor_h24, valor_h25]

[main] DEBUG - {rset-100005} Result: [6871, 20071001, 6, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 5, 5, 5, 5, null]

[main] DEBUG - {rset-100005} Result: [6871, 20071002, 6, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 5, 5, 5, 5, null]

[main] DEBUG - {rset-100005} Result: [6871, 20071003, 6, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 5, 5, 5, 5, null]

 

... many more rows here....

 

[main] DEBUG - {rset-100005} Result: [1331045, 20071027, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, null]

[main] DEBUG - {rset-100005} Result: [1331045, 20071028, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, null]

[main] DEBUG - {rset-100005} Result: [1331045, 20071029, 6, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 5, 5, 5, 5, null]

[main] DEBUG - {rset-100005} Result: [1331045, 20071030, 6, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 5, 5, 5, 5, null]

[main] DEBUG - Triggering beforeCommit synchronization

[main] DEBUG - Triggering beforeCompletion synchronization

[main] DEBUG - Closing JDBC Connection

[main] DEBUG - Triggering afterCompletion synchronization

[main] INFO - All data was retrieved in: 148278ms


________________________________

De: Randall Svancara [mailto:rsvancara@wsu.edu]
Enviado el: lun 28/01/2008 18:05
Para: user-java@ibatis.apache.org
Asunto: Re: poor performance



Turn on debugging and send the output.  Also send the queries if you can
so that we know what you are trying to query within reason of course. 

Also make sure you are querying the same database as you are querying in
with your jdbc driver.  Also make sure you are using query properly,
hitting the indexes and such. 

Also, if you are returning back large record sets, consider returning
back smaller record sets, and if you can't, try using paginated results.

I know this some of this seems rudimentary, but let's get rid of the
obvious problems first.

- 
Randall Svancara


On Mon, 2008-01-28 at 17:56 +0100, Gerardo Corro Fuentes wrote:
> Hi,
> 
> I built a DAO with IBatis 2.2.0. Most of this DAO works properly,
> however thre are a couple of queries that are very slow, it takes 2
> minutes for them to be completed while a plain JDBC querie takes only
> three seconds.
> 
> I verified the slow quieries many times, and they actually look very
> similar to others that run very fast.
> 
> I also Spring 1.2; commons DBCP 1.4.
> 
> Thanks!!!
> 
>
>
> The ibatis config file looks like:
> 
> <settings
>
> cacheModelsEnabled="false"
>
> enhancementEnabled="true"
>
> maxSessions="64"
>
> maxTransactions="8"
>
> maxRequests="128"
>
> useStatementNamespaces="true"/>
>
> 
>
>
>
>
>
>
>
>
>
> <?sml version="1.0" encoding="UTF-8" ?>
>
> <!DOCTYPE sqlMap
>
> PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN"
>
> "http://www.ibatis.com/dtd/sql-map-2.dtd">
>
> <sqlMap namespace="CurvaHoraria">
>
> <typeAlias alias="curvaHoraria" type="com.db.dto.DTO1"/>
>
> <resultMap id="curvaHorariaResult" class="curvaHoraria">
>
> <result property="guidPm" column="guid_pm"/>
>
> <result property="fecha" column="fecha"/>
>
> <result property="periodo1" column="valor_h01"/>
>
> <result property="periodo2" column="valor_h02"/>
>
> <result property="periodo3" column="valor_h03"/>
>
> <result property="periodo4" column="valor_h04"/>
>
> <result property="periodo5" column="valor_h05"/>
>
> <result property="periodo6" column="valor_h06"/>
>
> <result property="periodo7" column="valor_h07"/>
>
> <result property="periodo8" column="valor_h08"/>
>
> <result property="periodo9" column="valor_h09"/>
>
> <result property="periodo10" column="valor_h10"/>
>
> <result property="periodo11" column="valor_h11"/>
>
> <result property="periodo12" column="valor_h12"/>
>
> <result property="periodo13" column="valor_h13"/>
>
> <result property="periodo14" column="valor_h14"/>
>
> <result property="periodo15" column="valor_h15"/>
>
> <result property="periodo16" column="valor_h16"/>
>
> <result property="periodo17" column="valor_h17"/>
>
> <result property="periodo18" column="valor_h18"/>
>
> <result property="periodo19" column="valor_h19"/>
>
> <result property="periodo20" column="valor_h20"/>
>
> <result property="periodo21" column="valor_h21"/>
>
> <result property="periodo22" column="valor_h22"/>
>
> <result property="periodo23" column="valor_h23"/>
>
> <result property="periodo24" column="valor_h24"/>
>
> <result property="periodo25" column="valor_h25"/>
>
> </resultMap>
>
> <sql id="fragmento_fechas">
>
> (
>
> vwpm.f_desde_pf <![CDATA[<=]]> to_date(#fecha_desde#,'yyyymmdd')
>
> OR vwpm.f_desde_pf <![CDATA[<=]]> to_date(#fecha_hasta#,'yyyymmdd')
>
> )
>
> AND (
>
> vwpm.f_hasta_pf <![CDATA[>=]]> to_date(#fecha_desde#,'yyyymmdd')
>
> OR vwpm.f_hasta_pf <![CDATA[>=]]> to_date(#fecha_hasta#,'yyyymmdd')
>
> )
>
> AND (
>
> vwpm.f_desde_pm <![CDATA[<=]]> to_date(#fecha_desde#,'yyyymmdd')
>
> OR vwpm.f_desde_pm <![CDATA[<=]]> to_date(#fecha_hasta#,'yyyymmdd')
>
> )
>
> AND (
>
> vwpm.f_hasta_pm <![CDATA[>=]]> to_date(#fecha_desde#,'yyyymmdd')
>
> OR vwpm.f_hasta_pm <![CDATA[>=]]> to_date(#fecha_hasta#,'yyyymmdd')
>
> )
>
> AND (
>
> vwpm.f_desde_cpf <![CDATA[<=]]> to_date(#fecha_desde#,'yyyymmdd')
>
> OR vwpm.f_desde_cpf <![CDATA[<=]]> to_date(#fecha_hasta#,'yyyymmdd')
>
> )
>
> AND(
>
> vwpm.f_hasta_cpf <![CDATA[>=]]> to_date(#fecha_desde#,'yyyymmdd')
>
> OR vwpm.f_hasta_cpf <![CDATA[>=]]> to_date(#fecha_hasta#,'yyyymmdd')
>
> )
>
> AND (
>
> vwpm.f_desde_apmpf <![CDATA[<=]]> to_date(#fecha_desde#,'yyyymmdd')
>
> OR vwpm.f_desde_apmpf <![CDATA[<=]]> to_date(#fecha_hasta#,'yyyymmdd')
>
> )
>
> AND (
>
> vwpm.f_hasta_apmpf <![CDATA[>=]]> to_date(#fecha_desde#,'yyyymmdd')
>
> OR vwpm.f_hasta_apmpf <![CDATA[>=]]> to_date(#fecha_hasta#,'yyyymmdd')
>
> )
>
> AND (
>
> vwpm.f_desde_cpm <![CDATA[<=]]> to_date(#fecha_desde#,'yyyymmdd')
>
> OR vwpm.f_desde_cpm <![CDATA[<=]]> to_date(#fecha_hasta#,'yyyymmdd')
>
> )
>
> AND (
>
> vwpm.f_hasta_cpm <![CDATA[>=]]> to_date(#fecha_desde#,'yyyymmdd')
>
> OR vwpm.f_hasta_cpm <![CDATA[>=]]> to_date(#fecha_hasta#,'yyyymmdd')
>
> )
>
> AND (
>
> vwpm.f_desde_cpma <![CDATA[<=]]> to_date(#fecha_desde#,'yyyymmdd')
>
> OR vwpm.f_desde_cpma <![CDATA[<=]]> to_date(#fecha_hasta#,'yyyymmdd')
>
> )
>
> AND (
>
> vwpm.f_hasta_cpma <![CDATA[>=]]> to_date(#fecha_desde#,'yyyymmdd')
>
> OR vwpm.f_hasta_cpma <![CDATA[>=]]> to_date(#fecha_hasta#,'yyyymmdd')
>
> )
>
> AND (
>
> vwpm.f_desde_tc <![CDATA[<=]]> to_date(#fecha_desde#,'yyyymmdd')
>
> OR vwpm.f_desde_tc <![CDATA[<=]]> to_date(#fecha_hasta#,'yyyymmdd')
>
> )
>
> AND (
>
> vwpm.f_hasta_tc <![CDATA[>=]]> to_date(#fecha_desde#,'yyyymmdd')
>
> OR vwpm.f_hasta_tc <![CDATA[>=]]> to_date(#fecha_hasta#,'yyyymmdd')
>
> )
>
> </sql>
>
> <select id="obtenerCurvas" resultMap="curvaHorariaResult"
> parameterClass="curvaHoraria">
>
> SELECT distinct(guid_pm), fecha, valor_h01, valor_h02, valor_h03,
> valor_h04, valor_h05, valor_h06, valor_h07,
>
> valor_h08, valor_h09, valor_h10, valor_h11, valor_h12, valor_h13,
> valor_h14, valor_h15, valor_h16, valor_h17,
>
> valor_h18, valor_h19, valor_h20, valor_h21, valor_h22, valor_h23,
> valor_h24, valor_h25
>
> from FLUMEN.vw_puntos_medida_ve vwpm, flumen.variables_periodo vp,
> flumen.periodovar p
>
> where vwpm.id_ccaa = vp.id_sitio
>
> and substr(vwpm.tarifa, 1, 1) = substr(vp.tarifa, 1, 1)
>
> and vp.id_var = p.id_var
>
> and p.fecha <![CDATA[>=]]> #fecha_desde#
>
> and p.fecha <![CDATA[<=]]> #fecha_hasta#
>
> AND
>
> <include refid="fragmento_fechas"/>
>
> order by guid_pm, fecha
>
> </select>
>
> <select id="obtenerPMs" resultClass="java.lang.String"
> parameterClass="curvaHoraria">
>
> select distinct(guid_pm) from FLUMEN.vw_puntos_medida_ve vwpm
>
> WHERE
>
> <include refid="fragmento_fechas"/>
>
> </select>
>
> </sqlMap>
>
> 
>
>
>
>
>
>
>
>
>
>
>
>
> ------------------------------------------------------------------
> This e-mail and the documents attached are confidential and intended
> solely
> for the addressee; it may also be privileged. If you receive this
> e-mail
> in error, please notify the sender immediately and destroy it.
> As its integrity cannot be secured on the Internet, the Atos Origin
> group
> liability cannot be triggered for the message content. Although the
> sender endeavours to maintain a computer virus-free network, the
> sender does
> not warrant that this transmission is virus-free and will not be
> liable for
> any damages resulting from any virus transmitted.
>
> Este mensaje y los ficheros adjuntos pueden contener informacion
> confidencial destinada solamente a la(s) persona(s) mencionadas
> anteriormente. Pueden estar protegidos por secreto profesional Si
> usted
> recibe este correo electronico por error, gracias de informar
> inmediatamente
> al remitente y destruir el mensaje.
> Al no estar asegurada la integridad de este mensaje sobre la red, Atos
> Origin no se hace responsable por su contenido. Su contenido no
> constituye
> ningun compromiso para el grupo Atos Origin, salvo ratificacion
> escrita por
> ambas partes.
> Aunque se esfuerza al maximo por mantener su red libre de virus, el
> emisor
> no puede garantizar nada al respecto y no sera responsable de
> cualesquiera
> danos que puedan resultar de una transmision de virus
> ------------------------------------------------------------------
>




------------------------------------------------------------------
This e-mail and the documents attached are confidential and intended solely
for the addressee; it may also be privileged. If you receive this e-mail
in error, please notify the sender immediately and destroy it.
As its integrity cannot be secured on the Internet, the Atos Origin group
liability cannot be triggered for the message content. Although the
sender endeavours to maintain a computer virus-free network, the sender does
not warrant that this transmission is virus-free and will not be liable for
any damages resulting from any virus transmitted.

Este mensaje y los ficheros adjuntos pueden contener informacion
confidencial destinada solamente a la(s) persona(s) mencionadas
anteriormente. Pueden estar protegidos por secreto profesional Si usted
recibe este correo electronico por error, gracias de informar inmediatamente
al remitente y destruir el mensaje.
Al no estar asegurada la integridad de este mensaje sobre la red, Atos
Origin no se hace responsable por su contenido. Su contenido no constituye
ningun compromiso para el grupo Atos Origin, salvo ratificacion escrita por
ambas partes.
Aunque se esfuerza al maximo por mantener su red libre de virus, el emisor
no puede garantizar nada al respecto y no sera responsable de cualesquiera
danos que puedan resultar de una transmision de virus
------------------------------------------------------------------

Re: poor performance

Posted by Randall Svancara <rs...@wsu.edu>.
Turn on debugging and send the output.  Also send the queries if you can
so that we know what you are trying to query within reason of course.  

Also make sure you are querying the same database as you are querying in
with your jdbc driver.  Also make sure you are using query properly,
hitting the indexes and such.  

Also, if you are returning back large record sets, consider returning
back smaller record sets, and if you can't, try using paginated results.

I know this some of this seems rudimentary, but let's get rid of the
obvious problems first.

-  
Randall Svancara


On Mon, 2008-01-28 at 17:56 +0100, Gerardo Corro Fuentes wrote:
> Hi,
>  
> I built a DAO with IBatis 2.2.0. Most of this DAO works properly,
> however thre are a couple of queries that are very slow, it takes 2
> minutes for them to be completed while a plain JDBC querie takes only
> three seconds.
>  
> I verified the slow quieries many times, and they actually look very
> similar to others that run very fast.
>  
> I also Spring 1.2; commons DBCP 1.4.
>  
> Thanks!!!
>  
> 
> 
> The ibatis config file looks like:
>  
> <settings
> 
> cacheModelsEnabled="false"
> 
> enhancementEnabled="true"
> 
> maxSessions="64"
> 
> maxTransactions="8"
> 
> maxRequests="128"
> 
> useStatementNamespaces="true"/>
> 
>  
> 
> 
> 
> 
> 
> 
> 
> 
> 
> <?sml version="1.0" encoding="UTF-8" ?>
> 
> <!DOCTYPE sqlMap
> 
> PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN"
> 
> "http://www.ibatis.com/dtd/sql-map-2.dtd">
> 
> <sqlMap namespace="CurvaHoraria">
> 
> <typeAlias alias="curvaHoraria" type="com.db.dto.DTO1"/> 
> 
> <resultMap id="curvaHorariaResult" class="curvaHoraria">
> 
> <result property="guidPm" column="guid_pm"/>
> 
> <result property="fecha" column="fecha"/>
> 
> <result property="periodo1" column="valor_h01"/>
> 
> <result property="periodo2" column="valor_h02"/>
> 
> <result property="periodo3" column="valor_h03"/>
> 
> <result property="periodo4" column="valor_h04"/>
> 
> <result property="periodo5" column="valor_h05"/>
> 
> <result property="periodo6" column="valor_h06"/>
> 
> <result property="periodo7" column="valor_h07"/>
> 
> <result property="periodo8" column="valor_h08"/>
> 
> <result property="periodo9" column="valor_h09"/>
> 
> <result property="periodo10" column="valor_h10"/>
> 
> <result property="periodo11" column="valor_h11"/>
> 
> <result property="periodo12" column="valor_h12"/>
> 
> <result property="periodo13" column="valor_h13"/>
> 
> <result property="periodo14" column="valor_h14"/>
> 
> <result property="periodo15" column="valor_h15"/>
> 
> <result property="periodo16" column="valor_h16"/>
> 
> <result property="periodo17" column="valor_h17"/>
> 
> <result property="periodo18" column="valor_h18"/>
> 
> <result property="periodo19" column="valor_h19"/>
> 
> <result property="periodo20" column="valor_h20"/>
> 
> <result property="periodo21" column="valor_h21"/>
> 
> <result property="periodo22" column="valor_h22"/>
> 
> <result property="periodo23" column="valor_h23"/>
> 
> <result property="periodo24" column="valor_h24"/>
> 
> <result property="periodo25" column="valor_h25"/>
> 
> </resultMap>
> 
> <sql id="fragmento_fechas">
> 
> (
> 
> vwpm.f_desde_pf <![CDATA[<=]]> to_date(#fecha_desde#,'yyyymmdd')
> 
> OR vwpm.f_desde_pf <![CDATA[<=]]> to_date(#fecha_hasta#,'yyyymmdd')
> 
> ) 
> 
> AND (
> 
> vwpm.f_hasta_pf <![CDATA[>=]]> to_date(#fecha_desde#,'yyyymmdd')
> 
> OR vwpm.f_hasta_pf <![CDATA[>=]]> to_date(#fecha_hasta#,'yyyymmdd')
> 
> )
> 
> AND (
> 
> vwpm.f_desde_pm <![CDATA[<=]]> to_date(#fecha_desde#,'yyyymmdd')
> 
> OR vwpm.f_desde_pm <![CDATA[<=]]> to_date(#fecha_hasta#,'yyyymmdd')
> 
> )
> 
> AND (
> 
> vwpm.f_hasta_pm <![CDATA[>=]]> to_date(#fecha_desde#,'yyyymmdd')
> 
> OR vwpm.f_hasta_pm <![CDATA[>=]]> to_date(#fecha_hasta#,'yyyymmdd')
> 
> )
> 
> AND (
> 
> vwpm.f_desde_cpf <![CDATA[<=]]> to_date(#fecha_desde#,'yyyymmdd')
> 
> OR vwpm.f_desde_cpf <![CDATA[<=]]> to_date(#fecha_hasta#,'yyyymmdd')
> 
> )
> 
> AND(
> 
> vwpm.f_hasta_cpf <![CDATA[>=]]> to_date(#fecha_desde#,'yyyymmdd')
> 
> OR vwpm.f_hasta_cpf <![CDATA[>=]]> to_date(#fecha_hasta#,'yyyymmdd')
> 
> )
> 
> AND (
> 
> vwpm.f_desde_apmpf <![CDATA[<=]]> to_date(#fecha_desde#,'yyyymmdd')
> 
> OR vwpm.f_desde_apmpf <![CDATA[<=]]> to_date(#fecha_hasta#,'yyyymmdd')
> 
> )
> 
> AND (
> 
> vwpm.f_hasta_apmpf <![CDATA[>=]]> to_date(#fecha_desde#,'yyyymmdd')
> 
> OR vwpm.f_hasta_apmpf <![CDATA[>=]]> to_date(#fecha_hasta#,'yyyymmdd')
> 
> )
> 
> AND (
> 
> vwpm.f_desde_cpm <![CDATA[<=]]> to_date(#fecha_desde#,'yyyymmdd')
> 
> OR vwpm.f_desde_cpm <![CDATA[<=]]> to_date(#fecha_hasta#,'yyyymmdd')
> 
> )
> 
> AND (
> 
> vwpm.f_hasta_cpm <![CDATA[>=]]> to_date(#fecha_desde#,'yyyymmdd')
> 
> OR vwpm.f_hasta_cpm <![CDATA[>=]]> to_date(#fecha_hasta#,'yyyymmdd')
> 
> )
> 
> AND (
> 
> vwpm.f_desde_cpma <![CDATA[<=]]> to_date(#fecha_desde#,'yyyymmdd')
> 
> OR vwpm.f_desde_cpma <![CDATA[<=]]> to_date(#fecha_hasta#,'yyyymmdd')
> 
> )
> 
> AND (
> 
> vwpm.f_hasta_cpma <![CDATA[>=]]> to_date(#fecha_desde#,'yyyymmdd')
> 
> OR vwpm.f_hasta_cpma <![CDATA[>=]]> to_date(#fecha_hasta#,'yyyymmdd')
> 
> )
> 
> AND (
> 
> vwpm.f_desde_tc <![CDATA[<=]]> to_date(#fecha_desde#,'yyyymmdd')
> 
> OR vwpm.f_desde_tc <![CDATA[<=]]> to_date(#fecha_hasta#,'yyyymmdd')
> 
> )
> 
> AND (
> 
> vwpm.f_hasta_tc <![CDATA[>=]]> to_date(#fecha_desde#,'yyyymmdd')
> 
> OR vwpm.f_hasta_tc <![CDATA[>=]]> to_date(#fecha_hasta#,'yyyymmdd')
> 
> )
> 
> </sql>
> 
> <select id="obtenerCurvas" resultMap="curvaHorariaResult"
> parameterClass="curvaHoraria">
> 
> SELECT distinct(guid_pm), fecha, valor_h01, valor_h02, valor_h03,
> valor_h04, valor_h05, valor_h06, valor_h07, 
> 
> valor_h08, valor_h09, valor_h10, valor_h11, valor_h12, valor_h13,
> valor_h14, valor_h15, valor_h16, valor_h17,
> 
> valor_h18, valor_h19, valor_h20, valor_h21, valor_h22, valor_h23,
> valor_h24, valor_h25 
> 
> from FLUMEN.vw_puntos_medida_ve vwpm, flumen.variables_periodo vp,
> flumen.periodovar p
> 
> where vwpm.id_ccaa = vp.id_sitio
> 
> and substr(vwpm.tarifa, 1, 1) = substr(vp.tarifa, 1, 1)
> 
> and vp.id_var = p.id_var
> 
> and p.fecha <![CDATA[>=]]> #fecha_desde#
> 
> and p.fecha <![CDATA[<=]]> #fecha_hasta#
> 
> AND
> 
> <include refid="fragmento_fechas"/>
> 
> order by guid_pm, fecha
> 
> </select>
> 
> <select id="obtenerPMs" resultClass="java.lang.String"
> parameterClass="curvaHoraria">
> 
> select distinct(guid_pm) from FLUMEN.vw_puntos_medida_ve vwpm
> 
> WHERE
> 
> <include refid="fragmento_fechas"/> 
> 
> </select>
> 
> </sqlMap>
> 
>  
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> ------------------------------------------------------------------
> This e-mail and the documents attached are confidential and intended
> solely
> for the addressee; it may also be privileged. If you receive this
> e-mail
> in error, please notify the sender immediately and destroy it.
> As its integrity cannot be secured on the Internet, the Atos Origin
> group
> liability cannot be triggered for the message content. Although the
> sender endeavours to maintain a computer virus-free network, the
> sender does
> not warrant that this transmission is virus-free and will not be
> liable for
> any damages resulting from any virus transmitted.
> 
> Este mensaje y los ficheros adjuntos pueden contener informacion
> confidencial destinada solamente a la(s) persona(s) mencionadas
> anteriormente. Pueden estar protegidos por secreto profesional Si
> usted
> recibe este correo electronico por error, gracias de informar
> inmediatamente
> al remitente y destruir el mensaje.
> Al no estar asegurada la integridad de este mensaje sobre la red, Atos
> Origin no se hace responsable por su contenido. Su contenido no
> constituye
> ningun compromiso para el grupo Atos Origin, salvo ratificacion
> escrita por
> ambas partes.
> Aunque se esfuerza al maximo por mantener su red libre de virus, el
> emisor
> no puede garantizar nada al respecto y no sera responsable de
> cualesquiera
> danos que puedan resultar de una transmision de virus
> ------------------------------------------------------------------
> 

Re: poor performance

Posted by Larry Meadors <lm...@apache.org>.
Another thought on this - if you don't need all of the data at the
same time, a rowhandler will likely speed things up significantly by
reducing the amount of memory consumed.

Larry


On Jan 28, 2008 10:32 AM, Clinton Begin <cl...@gmail.com> wrote:
> Hi Gerardo,
>
> When you do your JDBC test, do you iterate over the result sets and get each
> of the columns from the result as well?  You can't just run time
> ps.execute() and say that it's faster.  You have to actually READ all of the
> data back, as in most cases the query runs very quickly, and it's the
> transmission and marshalling of the data that takes the time.
>
> Also, if you are returning many thousands of rows, consider the cost to
> instantiate the class as well (and consider what is in your constructor if
> anything).  Especially a DTO that has 30 properties.
>
> Cheers,
> Clinton
>
>
> -----Original Message-----
> From: Gerardo Corro Fuentes [mailto:gerardo.corro@mundivia.net]
> Sent: January-28-08 9:57 AM
> To: user-java@ibatis.apache.org
> Subject: poor performance
>
> Hi,
>
> I built a DAO with IBatis 2.2.0. Most of this DAO works properly, however
> thre are a couple of queries that are very slow, it takes 2 minutes for them
> to be completed while a plain JDBC querie takes only three seconds.
>
> I verified the slow quieries many times, and they actually look very similar
> to others that run very fast.
>
> I also Spring 1.2; commons DBCP 1.4.
>
> Thanks!!!
>
>
>
> The ibatis config file looks like:
>
> <settings
>
> cacheModelsEnabled="false"
>
> enhancementEnabled="true"
>
> maxSessions="64"
>
> maxTransactions="8"
>
> maxRequests="128"
>
> useStatementNamespaces="true"/>
>
>
>
>
>
>
>
>
>
>
>
> <?sml version="1.0" encoding="UTF-8" ?>
>
> <!DOCTYPE sqlMap
>
> PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN"
>
> "http://www.ibatis.com/dtd/sql-map-2.dtd">
>
> <sqlMap namespace="CurvaHoraria">
>
> <typeAlias alias="curvaHoraria" type="com.db.dto.DTO1"/>
>
> <resultMap id="curvaHorariaResult" class="curvaHoraria">
>
> <result property="guidPm" column="guid_pm"/>
>
> <result property="fecha" column="fecha"/>
>
> <result property="periodo1" column="valor_h01"/>
>
> <result property="periodo2" column="valor_h02"/>
>
> <result property="periodo3" column="valor_h03"/>
>
> <result property="periodo4" column="valor_h04"/>
>
> <result property="periodo5" column="valor_h05"/>
>
> <result property="periodo6" column="valor_h06"/>
>
> <result property="periodo7" column="valor_h07"/>
>
> <result property="periodo8" column="valor_h08"/>
>
> <result property="periodo9" column="valor_h09"/>
>
> <result property="periodo10" column="valor_h10"/>
>
> <result property="periodo11" column="valor_h11"/>
>
> <result property="periodo12" column="valor_h12"/>
>
> <result property="periodo13" column="valor_h13"/>
>
> <result property="periodo14" column="valor_h14"/>
>
> <result property="periodo15" column="valor_h15"/>
>
> <result property="periodo16" column="valor_h16"/>
>
> <result property="periodo17" column="valor_h17"/>
>
> <result property="periodo18" column="valor_h18"/>
>
> <result property="periodo19" column="valor_h19"/>
>
> <result property="periodo20" column="valor_h20"/>
>
> <result property="periodo21" column="valor_h21"/>
>
> <result property="periodo22" column="valor_h22"/>
>
> <result property="periodo23" column="valor_h23"/>
>
> <result property="periodo24" column="valor_h24"/>
>
> <result property="periodo25" column="valor_h25"/>
>
> </resultMap>
>
> <sql id="fragmento_fechas">
>
> (
>
> vwpm.f_desde_pf <![CDATA[<=]]> to_date(#fecha_desde#,'yyyymmdd')
>
> OR vwpm.f_desde_pf <![CDATA[<=]]> to_date(#fecha_hasta#,'yyyymmdd')
>
> )
>
> AND (
>
> vwpm.f_hasta_pf <![CDATA[>=]]> to_date(#fecha_desde#,'yyyymmdd')
>
> OR vwpm.f_hasta_pf <![CDATA[>=]]> to_date(#fecha_hasta#,'yyyymmdd')
>
> )
>
> AND (
>
> vwpm.f_desde_pm <![CDATA[<=]]> to_date(#fecha_desde#,'yyyymmdd')
>
> OR vwpm.f_desde_pm <![CDATA[<=]]> to_date(#fecha_hasta#,'yyyymmdd')
>
> )
>
> AND (
>
> vwpm.f_hasta_pm <![CDATA[>=]]> to_date(#fecha_desde#,'yyyymmdd')
>
> OR vwpm.f_hasta_pm <![CDATA[>=]]> to_date(#fecha_hasta#,'yyyymmdd')
>
> )
>
> AND (
>
> vwpm.f_desde_cpf <![CDATA[<=]]> to_date(#fecha_desde#,'yyyymmdd')
>
> OR vwpm.f_desde_cpf <![CDATA[<=]]> to_date(#fecha_hasta#,'yyyymmdd')
>
> )
>
> AND(
>
> vwpm.f_hasta_cpf <![CDATA[>=]]> to_date(#fecha_desde#,'yyyymmdd')
>
> OR vwpm.f_hasta_cpf <![CDATA[>=]]> to_date(#fecha_hasta#,'yyyymmdd')
>
> )
>
> AND (
>
> vwpm.f_desde_apmpf <![CDATA[<=]]> to_date(#fecha_desde#,'yyyymmdd')
>
> OR vwpm.f_desde_apmpf <![CDATA[<=]]> to_date(#fecha_hasta#,'yyyymmdd')
>
> )
>
> AND (
>
> vwpm.f_hasta_apmpf <![CDATA[>=]]> to_date(#fecha_desde#,'yyyymmdd')
>
> OR vwpm.f_hasta_apmpf <![CDATA[>=]]> to_date(#fecha_hasta#,'yyyymmdd')
>
> )
>
> AND (
>
> vwpm.f_desde_cpm <![CDATA[<=]]> to_date(#fecha_desde#,'yyyymmdd')
>
> OR vwpm.f_desde_cpm <![CDATA[<=]]> to_date(#fecha_hasta#,'yyyymmdd')
>
> )
>
> AND (
>
> vwpm.f_hasta_cpm <![CDATA[>=]]> to_date(#fecha_desde#,'yyyymmdd')
>
> OR vwpm.f_hasta_cpm <![CDATA[>=]]> to_date(#fecha_hasta#,'yyyymmdd')
>
> )
>
> AND (
>
> vwpm.f_desde_cpma <![CDATA[<=]]> to_date(#fecha_desde#,'yyyymmdd')
>
> OR vwpm.f_desde_cpma <![CDATA[<=]]> to_date(#fecha_hasta#,'yyyymmdd')
>
> )
>
> AND (
>
> vwpm.f_hasta_cpma <![CDATA[>=]]> to_date(#fecha_desde#,'yyyymmdd')
>
> OR vwpm.f_hasta_cpma <![CDATA[>=]]> to_date(#fecha_hasta#,'yyyymmdd')
>
> )
>
> AND (
>
> vwpm.f_desde_tc <![CDATA[<=]]> to_date(#fecha_desde#,'yyyymmdd')
>
> OR vwpm.f_desde_tc <![CDATA[<=]]> to_date(#fecha_hasta#,'yyyymmdd')
>
> )
>
> AND (
>
> vwpm.f_hasta_tc <![CDATA[>=]]> to_date(#fecha_desde#,'yyyymmdd')
>
> OR vwpm.f_hasta_tc <![CDATA[>=]]> to_date(#fecha_hasta#,'yyyymmdd')
>
> )
>
> </sql>
>
> <select id="obtenerCurvas" resultMap="curvaHorariaResult"
> parameterClass="curvaHoraria">
>
> SELECT distinct(guid_pm), fecha, valor_h01, valor_h02, valor_h03, valor_h04,
> valor_h05, valor_h06, valor_h07,
>
> valor_h08, valor_h09, valor_h10, valor_h11, valor_h12, valor_h13, valor_h14,
> valor_h15, valor_h16, valor_h17,
>
> valor_h18, valor_h19, valor_h20, valor_h21, valor_h22, valor_h23, valor_h24,
> valor_h25
>
> from FLUMEN.vw_puntos_medida_ve vwpm, flumen.variables_periodo vp,
> flumen.periodovar p
>
> where vwpm.id_ccaa = vp.id_sitio
>
> and substr(vwpm.tarifa, 1, 1) = substr(vp.tarifa, 1, 1)
>
> and vp.id_var = p.id_var
>
> and p.fecha <![CDATA[>=]]> #fecha_desde#
>
> and p.fecha <![CDATA[<=]]> #fecha_hasta#
>
> AND
>
> <include refid="fragmento_fechas"/>
>
> order by guid_pm, fecha
>
> </select>
>
> <select id="obtenerPMs" resultClass="java.lang.String"
> parameterClass="curvaHoraria">
>
> select distinct(guid_pm) from FLUMEN.vw_puntos_medida_ve vwpm
>
> WHERE
>
> <include refid="fragmento_fechas"/>
>
> </select>
>
> </sqlMap>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> ------------------------------------------------------------------
> This e-mail and the documents attached are confidential and intended solely
> for the addressee; it may also be privileged. If you receive this e-mail
> in error, please notify the sender immediately and destroy it.
> As its integrity cannot be secured on the Internet, the Atos Origin group
> liability cannot be triggered for the message content. Although the
> sender endeavours to maintain a computer virus-free network, the sender does
> not warrant that this transmission is virus-free and will not be liable for
> any damages resulting from any virus transmitted.
>
> Este mensaje y los ficheros adjuntos pueden contener informacion
> confidencial destinada solamente a la(s) persona(s) mencionadas
> anteriormente. Pueden estar protegidos por secreto profesional Si usted
> recibe este correo electronico por error, gracias de informar inmediatamente
> al remitente y destruir el mensaje.
> Al no estar asegurada la integridad de este mensaje sobre la red, Atos
> Origin no se hace responsable por su contenido. Su contenido no constituye
> ningun compromiso para el grupo Atos Origin, salvo ratificacion escrita por
> ambas partes.
> Aunque se esfuerza al maximo por mantener su red libre de virus, el emisor
> no puede garantizar nada al respecto y no sera responsable de cualesquiera
> danos que puedan resultar de una transmision de virus
> ------------------------------------------------------------------
>
>

RE: poor performance

Posted by Clinton Begin <cl...@gmail.com>.
Hi Gerardo,

When you do your JDBC test, do you iterate over the result sets and get each
of the columns from the result as well?  You can't just run time
ps.execute() and say that it's faster.  You have to actually READ all of the
data back, as in most cases the query runs very quickly, and it's the
transmission and marshalling of the data that takes the time.

Also, if you are returning many thousands of rows, consider the cost to
instantiate the class as well (and consider what is in your constructor if
anything).  Especially a DTO that has 30 properties.  

Cheers,
Clinton

-----Original Message-----
From: Gerardo Corro Fuentes [mailto:gerardo.corro@mundivia.net] 
Sent: January-28-08 9:57 AM
To: user-java@ibatis.apache.org
Subject: poor performance

Hi,
 
I built a DAO with IBatis 2.2.0. Most of this DAO works properly, however
thre are a couple of queries that are very slow, it takes 2 minutes for them
to be completed while a plain JDBC querie takes only three seconds.
 
I verified the slow quieries many times, and they actually look very similar
to others that run very fast.
 
I also Spring 1.2; commons DBCP 1.4.
 
Thanks!!!
 
 
 
The ibatis config file looks like:
 
<settings

cacheModelsEnabled="false"

enhancementEnabled="true"

maxSessions="64"

maxTransactions="8"

maxRequests="128"

useStatementNamespaces="true"/>

 

 

 

 

 

<?sml version="1.0" encoding="UTF-8" ?>

<!DOCTYPE sqlMap

PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN"

"http://www.ibatis.com/dtd/sql-map-2.dtd">

<sqlMap namespace="CurvaHoraria">

<typeAlias alias="curvaHoraria" type="com.db.dto.DTO1"/> 

<resultMap id="curvaHorariaResult" class="curvaHoraria">

<result property="guidPm" column="guid_pm"/>

<result property="fecha" column="fecha"/>

<result property="periodo1" column="valor_h01"/>

<result property="periodo2" column="valor_h02"/>

<result property="periodo3" column="valor_h03"/>

<result property="periodo4" column="valor_h04"/>

<result property="periodo5" column="valor_h05"/>

<result property="periodo6" column="valor_h06"/>

<result property="periodo7" column="valor_h07"/>

<result property="periodo8" column="valor_h08"/>

<result property="periodo9" column="valor_h09"/>

<result property="periodo10" column="valor_h10"/>

<result property="periodo11" column="valor_h11"/>

<result property="periodo12" column="valor_h12"/>

<result property="periodo13" column="valor_h13"/>

<result property="periodo14" column="valor_h14"/>

<result property="periodo15" column="valor_h15"/>

<result property="periodo16" column="valor_h16"/>

<result property="periodo17" column="valor_h17"/>

<result property="periodo18" column="valor_h18"/>

<result property="periodo19" column="valor_h19"/>

<result property="periodo20" column="valor_h20"/>

<result property="periodo21" column="valor_h21"/>

<result property="periodo22" column="valor_h22"/>

<result property="periodo23" column="valor_h23"/>

<result property="periodo24" column="valor_h24"/>

<result property="periodo25" column="valor_h25"/>

</resultMap>

<sql id="fragmento_fechas">

(

vwpm.f_desde_pf <![CDATA[<=]]> to_date(#fecha_desde#,'yyyymmdd')

OR vwpm.f_desde_pf <![CDATA[<=]]> to_date(#fecha_hasta#,'yyyymmdd')

) 

AND (

vwpm.f_hasta_pf <![CDATA[>=]]> to_date(#fecha_desde#,'yyyymmdd')

OR vwpm.f_hasta_pf <![CDATA[>=]]> to_date(#fecha_hasta#,'yyyymmdd')

)

AND (

vwpm.f_desde_pm <![CDATA[<=]]> to_date(#fecha_desde#,'yyyymmdd')

OR vwpm.f_desde_pm <![CDATA[<=]]> to_date(#fecha_hasta#,'yyyymmdd')

)

AND (

vwpm.f_hasta_pm <![CDATA[>=]]> to_date(#fecha_desde#,'yyyymmdd')

OR vwpm.f_hasta_pm <![CDATA[>=]]> to_date(#fecha_hasta#,'yyyymmdd')

)

AND (

vwpm.f_desde_cpf <![CDATA[<=]]> to_date(#fecha_desde#,'yyyymmdd')

OR vwpm.f_desde_cpf <![CDATA[<=]]> to_date(#fecha_hasta#,'yyyymmdd')

)

AND(

vwpm.f_hasta_cpf <![CDATA[>=]]> to_date(#fecha_desde#,'yyyymmdd')

OR vwpm.f_hasta_cpf <![CDATA[>=]]> to_date(#fecha_hasta#,'yyyymmdd')

)

AND (

vwpm.f_desde_apmpf <![CDATA[<=]]> to_date(#fecha_desde#,'yyyymmdd')

OR vwpm.f_desde_apmpf <![CDATA[<=]]> to_date(#fecha_hasta#,'yyyymmdd')

)

AND (

vwpm.f_hasta_apmpf <![CDATA[>=]]> to_date(#fecha_desde#,'yyyymmdd')

OR vwpm.f_hasta_apmpf <![CDATA[>=]]> to_date(#fecha_hasta#,'yyyymmdd')

)

AND (

vwpm.f_desde_cpm <![CDATA[<=]]> to_date(#fecha_desde#,'yyyymmdd')

OR vwpm.f_desde_cpm <![CDATA[<=]]> to_date(#fecha_hasta#,'yyyymmdd')

)

AND (

vwpm.f_hasta_cpm <![CDATA[>=]]> to_date(#fecha_desde#,'yyyymmdd')

OR vwpm.f_hasta_cpm <![CDATA[>=]]> to_date(#fecha_hasta#,'yyyymmdd')

)

AND (

vwpm.f_desde_cpma <![CDATA[<=]]> to_date(#fecha_desde#,'yyyymmdd')

OR vwpm.f_desde_cpma <![CDATA[<=]]> to_date(#fecha_hasta#,'yyyymmdd')

)

AND (

vwpm.f_hasta_cpma <![CDATA[>=]]> to_date(#fecha_desde#,'yyyymmdd')

OR vwpm.f_hasta_cpma <![CDATA[>=]]> to_date(#fecha_hasta#,'yyyymmdd')

)

AND (

vwpm.f_desde_tc <![CDATA[<=]]> to_date(#fecha_desde#,'yyyymmdd')

OR vwpm.f_desde_tc <![CDATA[<=]]> to_date(#fecha_hasta#,'yyyymmdd')

)

AND (

vwpm.f_hasta_tc <![CDATA[>=]]> to_date(#fecha_desde#,'yyyymmdd')

OR vwpm.f_hasta_tc <![CDATA[>=]]> to_date(#fecha_hasta#,'yyyymmdd')

)

</sql>

<select id="obtenerCurvas" resultMap="curvaHorariaResult"
parameterClass="curvaHoraria">

SELECT distinct(guid_pm), fecha, valor_h01, valor_h02, valor_h03, valor_h04,
valor_h05, valor_h06, valor_h07, 

valor_h08, valor_h09, valor_h10, valor_h11, valor_h12, valor_h13, valor_h14,
valor_h15, valor_h16, valor_h17,

valor_h18, valor_h19, valor_h20, valor_h21, valor_h22, valor_h23, valor_h24,
valor_h25 

from FLUMEN.vw_puntos_medida_ve vwpm, flumen.variables_periodo vp,
flumen.periodovar p

where vwpm.id_ccaa = vp.id_sitio

and substr(vwpm.tarifa, 1, 1) = substr(vp.tarifa, 1, 1)

and vp.id_var = p.id_var

and p.fecha <![CDATA[>=]]> #fecha_desde#

and p.fecha <![CDATA[<=]]> #fecha_hasta#

AND

<include refid="fragmento_fechas"/>

order by guid_pm, fecha

</select>

<select id="obtenerPMs" resultClass="java.lang.String"
parameterClass="curvaHoraria">

select distinct(guid_pm) from FLUMEN.vw_puntos_medida_ve vwpm

WHERE

<include refid="fragmento_fechas"/> 

</select>

</sqlMap>

 

 

 

 

 

 


------------------------------------------------------------------
This e-mail and the documents attached are confidential and intended solely
for the addressee; it may also be privileged. If you receive this e-mail
in error, please notify the sender immediately and destroy it.
As its integrity cannot be secured on the Internet, the Atos Origin group
liability cannot be triggered for the message content. Although the
sender endeavours to maintain a computer virus-free network, the sender does
not warrant that this transmission is virus-free and will not be liable for
any damages resulting from any virus transmitted.

Este mensaje y los ficheros adjuntos pueden contener informacion
confidencial destinada solamente a la(s) persona(s) mencionadas
anteriormente. Pueden estar protegidos por secreto profesional Si usted
recibe este correo electronico por error, gracias de informar inmediatamente
al remitente y destruir el mensaje.
Al no estar asegurada la integridad de este mensaje sobre la red, Atos
Origin no se hace responsable por su contenido. Su contenido no constituye
ningun compromiso para el grupo Atos Origin, salvo ratificacion escrita por
ambas partes.
Aunque se esfuerza al maximo por mantener su red libre de virus, el emisor
no puede garantizar nada al respecto y no sera responsable de cualesquiera
danos que puedan resultar de una transmision de virus
------------------------------------------------------------------