Can anybody code a faster processing update statement then the one I have here. So for its up to an hour in processing. I need to work on my coding skills for fast and efficient queries.
UPDATE hbc_boiler_inspection
SET hbc_boiler_inspection.PAID_flag = 1
FROM hbc_boiler_inspection, hbc_zImport, hbc_boiler
WHERE hbc_boiler_inspection.boiler_id = hbc_boiler.id
AND hbc_boiler.state_no = hbc_zImport.state_no
OR hbc_zImport.FEE > 1
OR hbc_zImport.FEE = 'OLD'
OR hbc_zImport.FEE = 'PDINS'
OR hbc_zImport.FEE = 'PAID'
UPDATE hbc_boiler_inspection
SET hbc_boiler_inspection.PAID_flag = 1
FROM hbc_boiler_inspection, hbc_zImport, hbc_boiler
WHERE hbc_boiler_inspection.boiler_id = hbc_boiler.id
AND hbc_boiler.state_no = hbc_zImport.state_no
OR hbc_zImport.FEE > 1
OR hbc_zImport.FEE = 'OLD'
OR hbc_zImport.FEE = 'PDINS'
OR hbc_zImport.FEE = 'PAID'