can some one explain to me why there is this difference in performance:
the first select statement take more than one minute the second one which is the same but only selects the id takes only seconds.
here are the queries:
Code:
select
newseventb0_.id as id20_, newseventb0_1_.AANHEF as AANHEF20_, newseventb0_1_.AANHEF_EXTRA as AANHEF3_20_, newseventb0_1_.ABO as ABO20_, newseventb0_1_.BATCH as BATCH20_, newseventb0_1_.BOUNCEDT as BOUNCEDT20_, newseventb0_1_.BOUNCED as BOUNCED20_, newseventb0_1_.BOUNCECNT as BOUNCECNT20_, newseventb0_1_.CIM as CIM20_, newseventb0_1_.DTECREATED as DTECREATED20_, newseventb0_1_.CI_FILE_FK as CI27_20_, newseventb0_1_.MAIL as MAIL20_, newseventb0_1_.MAIL_DOMAIN as MAIL12_20_, newseventb0_1_.MAILING_TYPE as MAILING13_20_, newseventb0_1_.MARKETINGCODE as MARKETI14_20_, newseventb0_1_.DTEMODIFIED as DTEMODI15_20_, newseventb0_1_.NAME as NAME20_, newseventb0_1_.ONLY_TEXT as ONLY17_20_, newseventb0_1_.OPTOUT as OPTOUT20_, newseventb0_1_.OVEREENKOMST_ID as OVEREEN19_20_, newseventb0_1_.PROFIELTYPE as PROFIEL20_20_, newseventb0_1_.RELATIENUMMER as RELATIE21_20_, newseventb0_1_.BRON as BRON20_, newseventb0_1_.DTESUB as DTESUB20_, newseventb0_1_.TESTUSER as TESTUSER20_, newseventb0_1_.DTEUNSUB as DTEUNSUB20_, newseventb0_1_.DTEVERZENDING as DTEVERZ26_20_, newseventb0_.ARTID_ACT as ARTID1_21_, newseventb0_.ARTID_BRAND as ARTID2_21_, newseventb0_.ARTID_COM1 as ARTID3_21_, newseventb0_.ARTID_COM2 as ARTID4_21_, newseventb0_.ARTID_EB as ARTID5_21_, newseventb0_.ARTID_POLL as ARTID6_21_, newseventb0_.ARTID_RED1 as ARTID7_21_, newseventb0_.ARTID_RED2 as ARTID8_21_, newseventb0_.ARTID_RNP1 as ARTID9_21_, newseventb0_.ARTID_RNP2 as ARTID10_21_, newseventb0_.ARTID_RNP3 as ARTID11_21_, newseventb0_.EOM_NR as EOM12_21_, newseventb0_.NBA_OFFER_TRACKING_1 as NBA13_21_, newseventb0_.NBA_OFFER_TRACKING_2 as NBA14_21_, newseventb0_.RNP_MEETDATUM as RNP15_21_, newseventb0_.RNP_SALDO as RNP16_21_, newseventb0_.RAPPORTAGE_GROEP as RAPPORTAGE17_21_, newseventb0_.SUBJECTLINE as SUBJECT18_21_
from USER_ING_EOM newseventb0_ inner join USER_GENERIC_MESSAGENT newseventb0_1_ on newseventb0_.id=newseventb0_1_.id where MAIL=? and (ARTID_ACT=? or ARTID_BRAND=? or ARTID_COM1=? or ARTID_COM2=? or ARTID_EB=? or ARTID_POLL=? or ARTID_RED1=? or ARTID_RED2=? or ARTID_RNP1=? or ARTID_RNP2=? or ARTID_RNP3=?)
Code:
select
newseventb0_.id as col_0_0_
from USER_ING_EOM newseventb0_ inner join USER_GENERIC_MESSAGENT newseventb0_1_ on newseventb0_.id=newseventb0_1_.id where MAIL=? and (ARTID_ACT=? or ARTID_BRAND=? or ARTID_COM1=? or ARTID_COM2=? or ARTID_EB=? or ARTID_POLL=? or ARTID_RED1=? or ARTID_RED2=? or ARTID_RNP1=? or ARTID_RNP2=? or ARTID_RNP3=?)