1 Reply Latest reply on Feb 4, 2008 6:39 AM by georgesberscheid

    Anormally long time for a query

    limousyf

      Hello,

      I try to debug my seam application, using hibernate 3.2.4.
      I have a oddly long request:

      06:05:36,267 INFO [STDOUT] Collaborateur - getRegies : Feb 2, 2008 6:05:36 AM
      06:05:36,267 INFO [STDOUT] Collaborateur - getOD : Feb 2, 2008 6:05:36 AM
      06:05:36,268 INFO [STDOUT] Collaborateur - getRegies : Feb 2, 2008 6:05:36 AM
      06:05:36,268 INFO [STDOUT] Collaborateur - getOD : Feb 2, 2008 6:05:36 AM
      06:05:36,853 INFO [STDOUT] Hibernate: select societe0_.societe_id as societe1_40_, societe0_.taux_tva as taux4_40_, societe0_.logo_societe as logo2_40_, societe0_.code_societe as code3_40_, societe0_.condition_reglement as condition5_40_ from societe societe0_ limit ?
      06:05:53,628 INFO [STDOUT] Collaborateur - getRegies : Feb 2, 2008 6:05:53 AM
      06:05:53,713 INFO [STDOUT] Collaborateur - getRegies : Feb 2, 2008 6:05:53 AM
      


      As you can see on the debug, the "select societe" took 17 seconds but there is only 2 lines in my "societe" table.
      A lot of relations exists to this table but everything is in lazy so I'm sure I'm pretty sure I'm not fetching the whole database here ...

      Does anybody have an idea on that problem ?

      Regards

        • 1. Re: Anormally long time for a query
          georgesberscheid

          You might have concurrent transactions that are writing into your table (like modifying the records) which will block the SELECT query until they're done. If the other transaction is waiting for something external before it commits, your select will take long.

          Georges