RE: Left join query

2009-06-01 Thread Gavin Towey
A LEFT OUTER JOIN in that query in not necessary. An inner join should be used. -Original Message- From: Shiv [mailto:shiv...@gmail.com] Sent: Saturday, May 30, 2009 10:18 PM To: bharani kumar Cc: mysql Subject: Re: Left join query Hi, Along with tables, you should also provide

Re: Left join query

2009-05-30 Thread Shiv
Hi, Along with tables, you should also provide details on how they are related. Assuming "Code" is unique in both tables and left joined on Airport table, you can do something like this SELECT A.Code, C.Code, A.SlNo, C.SlNo, A.Name, C.Location, A.status, C.status, C.type FROM Airport A LEFT OU

Re: Left Join Query Too Slow

2002-06-20 Thread Francisco Reinaldo
Hola Javier, It is difficult to tell because you did not include the table structures, relationships, indices, etc. But... at a first glance we is killing you query anyways is this: > FROM > Bill b, Hour h The poor db engine is probably creating a huge temporary table with all

Re: Left Join Query Too Slow

2002-06-20 Thread Galen Wright-Watson
On Thu, 20 Jun 2002, Javier Campoamor wrote: > Hi, > > I have a problem with the next query because it's too slow (>10 seconds) and > I need to do 10 queries like this one to show a page. > > > > SELECT > h.Hour, count(c.Amount) As NumberOfCalls, sum(c.Amount) As Amount >