Query too long

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • centeio69
    New Member
    • Jun 2008
    • 2

    Query too long

    Hello everyone,

    I'm having some troubles displying this query in SQL Developer.I have 3 tables:
    MASTER_TRANSACT ION_HIST is a big table with millions of rows
    LOCAL and PLAFOND are small cardinality tables.

    select mt.LOCAL_ID, plf.SUBAGENT_ID , l.DESCRIPTION, to_char(min(mt. DATE_TRANS), 'dd-mm-yyyy')

    from ADM.MASTER_TRAN SACTION_HIST mt, ADM.LOCAL l, ADM.PLAFOND plf

    where mt.LOCAL_ID = l.LOCAL_ID

    and mt.APPLICATION = 'ARPA'

    and mt.PLAFOND_ID = plf.PLF_ID

    and mt.DATE_TRANS >= to_date('01-01-2007','dd-mm-yyyy') and mt.DATE_TRANS < to_date('04-06-2008','dd-mm-yyyy')

    and plf.SUBAGENT_ID like '____3__' OR plf.SUBAGENT_ID like '____4__'

    group by mt.DATE_TRANS, mt.LOCAL_ID, plf.SUBAGENTE_I D, l.DESCRIPTION


    This query is taking too much time and giving me an IO error of no space left on device. I presume its too much data for him. Am i doing anything wrong ?

    thank you
  • r035198x
    MVP
    • Sep 2006
    • 13225

    #2
    What's the exact error message that you get?
    You probably just need to create an additional datafile for one of the tablespaces.

    Comment

    • centeio69
      New Member
      • Jun 2008
      • 2

      #3
      Originally posted by r035198x
      What's the exact error message that you get?
      You probably just need to create an additional datafile for one of the tablespaces.
      Exactly. Problem is solved... thanks a lot.

      Comment

      • r035198x
        MVP
        • Sep 2006
        • 13225

        #4
        Originally posted by centeio69
        Exactly. Problem is solved... thanks a lot.
        Welcome. I find that the error message is usually a complete give away.
        A more permanent solution to your problem is to define the dbf file such that it automatically extends when full and not limit it's size. Then you only get that error when the hard drive/partition itself is full.

        Or better yet, switch to ASM.
        Last edited by r035198x; Jun 4 '08, 05:10 PM. Reason: permanent spelling!

        Comment

        Working...