0

when i try to run this query on SQL developer it starts but never ends and doesn't give results, can someone help me optimize this query please :

SELECT 
    ASSOC_BILLET_OPERATION.IDASSOCBILLETOPERATION,
    ASSOC_BILLET_OPERATION.FKIDBILLET,
    ASSOC_BILLET_OPERATION.FKIDOPERATION
FROM 
    DATAMART.ASSOC_BILLET_OPERATION
       ,DATAMART.BILLET 
       ,DATAMART.Seance
WHERE 
BILLET.IDBILLET = ASSOC_BILLET_OPERATION.FKIDBILLET
AND Seance.idseance = Billet.fkidseance
AND Seance.DATEDEBUT >=TO_TIMESTAMP('2011010104:00:00','YYYYMMDD HH24:MI:SS')
forpas
  • 160,666
  • 10
  • 38
  • 76
geekZ
  • 1
  • We don't know anything about the tables, indexes, data volumes etc. Start by looking at the execution plan and seeing if it's doing something you don't expect. – Alex Poole Jun 10 '20 at 13:26
  • 1
    Please read [this excellent post about asking Oracle tuning questions on this site](https://stackoverflow.com/a/34975420/146325). There is **no way** we can solve your problem simply by looking at a query: tuning requires a lot more information. – APC Jun 10 '20 at 13:41
  • One obvious point: the date criteria specifies all rows since 2011. How many rows is a decade's worth of data? What would be a reasonable response time for that many rows? – APC Jun 10 '20 at 13:44
  • this is a generic date so when i run the query the date i use is 20190901 and to answer your question about the number of rows if the table : 397547717 rows .Thank you for your help – geekZ Jun 10 '20 at 14:35

0 Answers0