我正在php服务器上运行一个实时项目 当我使用左连接加入两个大表时,几秒后显示错误..
我正在使用此查询加入表格。
左表有30000行
$mergefile = mysql_query("INSERT INTO tbl_transaction(`account_code`,
`description`, `accounting_period`, `transaction_date`,
`base_amount`, `dcmarker`, `journal_no`, `journal_type`,
`yaddayaddda`,`yetmorecolumns`, `month`, createdatetime)
SELECT f.account_code, f.description, f.accounting_period,
f.transaction_date, f.base_amount, f.dcmarker, f.journal_no,
f.journal_type, f.journal_source, f.transaction_reference,
f.lotsmorecolumns, t.party_name, t.pan, t.company, f.month,
f.actualdescription, '".$_SESSION['user_id_tmp']."','$today'
FROM temp_tbl_transaction AS f
LEFT JOIN tbl_party_master AS t ON f.ecga LIKE CONCAT
('%',t.row_labels,'%') ORDER BY f.id");