I am working with mysql.There are around 9 lack records in one table (invoice)and 50,000 records (custdata)in the other table.Big table has 8 fields and other has 4 fields.
I want to retrieve those records from invoice whose CUST_NODE _ID matches with CUSTOMER _NODE_ID for a particular record.I am using following query-->
Select a.*from invoice a, custdata b where b.ACCOUNT_ID = '20276783' and b.CUSTOMER_NODE_ID=a.CUST_NB.
As soon as i run this query my database hangs.Can you suggest whats wrong?and how can i optimise i.e reduce select query executition time?