From: Victor Pendleton Date: July 9 2004 3:49pm Subject: RE: anyone help with this query? Returning tooooo many results List-Archive: http://lists.mysql.com/mysql/168779 Message-Id: <4810C017B52BD4118EEA00B0D020B0ED0F69E7EE@gamma.hoovers.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" It sounds like a cartesian join. Have you run an explain plan on this query? What are you joining the two tables on? -----Original Message----- From: Aaron Wolski To: mysql@stripped Sent: 7/9/04 10:33 AM Subject: anyone help with this query? Returning tooooo many results Hi all, Having a problem with a query that's returning 486,057 results when it most definitely should NOT be doing that. I have two tables: 1 for a list of customers that purchase product A, another for customers who purchased product B. Columns are: Id First Last Email I am trying to compare table 1 to table 2 to get a result set that gives me the contact info (table columns) for those whose email addresses in table 1 DON'T EQUAL those in table two. In table one I have 2026 records In table two I have 240 records The query is this: SELECT * FROM producta_customers AS t1, productb_customers AS t2 WHERE t1.email != t2.email When I do this query. I get 486,057 results returne. Where am I going wrong? Any ideas? Thanks so much for the help! Aaron -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql?unsub=VPendleton@stripped