I Have 2 table as following :


Table dump_trx a as much as 50.389 rows
andTable file_scan as much as 1004 rows
The query I run is as follows :
SELECT
DATEDIFF(DAY,CONVERT(varchar(30),dump_trx.execute_date, 102),file_scan.waktu_scan) AS SLA,
file_scan.waktu_scan,
dump_trx.norek_debit,
dump_trx.namarek_debit,
dump_trx.bank_tujuan,
dump_trx.norek_kredit,
dump_trx.namarek_kredit,
dump_trx.nama_perusahaan,
dump_trx.deskripsi,
dump_trx.execute_date,
dump_trx.id_perusahaan,
dump_trx.jenis_trx,
REPLACE(jumlah,',','') AS total
FROM vm.dump_trx, vm.file_scan
problem & question : when I run both queries at the same time, I have a problem.. Load query execution can't stop

What should the ideal query look like so as not to run into an infinite stack and load ?, please help me sir



