MySQL Forums
Forum List  »  Performance

Re: distinct clause issue for 600000 records
Posted by: Ra Nala
Date: November 13, 2015 05:56AM

Thank you very much, below are my updates for your queries.

@ Øystein Grøvlen : 1. LEFT JOIN: Don't use it if you do not mean it.

Ra Nala : I should use Left join only why because i want each and every records from left table i.e main table: prdsl even though null records retrieve if the join condition is not matched from right table in my scenario.

@ Øystein Grøvlen : 2. ON clause is for join conditions

Ra Nala : yes i want records for "ea2.address_type='Bil' and for other records will get null values if not matched. If i placed this condition in where clause i will get limited records, i want total records from i.e main table: prdsl

@ Øystein Grøvlen :3. Do not include tables that are not used in query.

Ra Nala : Yes Sir, you are 100% correct. I am using tables beship, beinv, and reginv in my joins but not retrieving any columns from these. i need to modify query. actually, previously we used few columns from these tables and few days back we removed columns but we forgot to remove tables in Joins.

Thank you very much for your valuable inputs.

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: distinct clause issue for 600000 records
885
November 13, 2015 05:56AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.