I am working with php and oracle to get data from oracle database and show up at php table with php code by connecting with oracle database. The problem is, I am getting data after long time during I have some for loop to run other query At first I have run a query which give me total card issued for till 23/11/2019(the date I have assigned at query), and this query also give all card canceled between 23/11/2019 to 25/11/2019 here are below the query in php with oci_excecute()
now I wanted to write another query which can give total Reissue cards but condition is employee have canceled a card before and reissue again between the date 23/11/2019 to 25/11/2019. for this I did following code
Now problem is there have a for loop executing a query till the array size which taking much time and I am getting result after long time. can you please tell me how can I make it fast to get result? Thanks