1

When executing a MySQL script that returns data from 3 inner joined tables through the Interactive SQL application, I can get 1.02 million records to write to a text file in 35 minutes. That same query, when executed automatically using dbisqlc.exe takes approximately 6.2 hours to run and produce the same data file.

How can I go about speeding the automation up?

SELECT *
FROM dba.t_cust a, dba.v_customer c , dba.v_cust_name n
where a.acct_id = c.acct_id and     
      c.acct_id = n.acct_id
ORDER by upd_datetime desc
Don't Panic
  • 41,125
  • 10
  • 61
  • 80
  • 1
    Add indexes. Take advantage of the `EXPLAIN` syntax. I have no idea what `dbisqlc.exe` is, but nothing here is about PHP. – aynber Sep 05 '17 at 18:21
  • It doesn't seem like there's enough info here to determine why it's slow. – Don't Panic Sep 05 '17 at 18:48
  • *through the Interactive SQL application*...what is that? The MySQL workbench? Btw - it doesn't add to performance but does to readability, use [explicit joins and not implicit joins](https://stackoverflow.com/questions/44917/explicit-vs-implicit-sql-joins) as you use. It the ANSI standard of 25 years! – Parfait Sep 05 '17 at 18:48

0 Answers0