Re: Re: Performance Question And Problem

2006-11-23 Thread Barry Newton
At 10:47 PM 11/23/2006, John Kopanas wrote: That is awesome... thanks. I still am not sure exactly though why this take 2 seconds while my methond took over a minute for the same amount of rows. In essence don't the two methods do the same things? No. Your approach was executing the subquery

Re: Re: Performance Question And Problem

2006-11-23 Thread mos
At 09:47 PM 11/23/2006, John Kopanas wrote: That is awesome... thanks. I still am not sure exactly though why this take 2 seconds while my methond took over a minute for the same amount of rows. In essence don't the two methods do the same things? The Group By executes in one operation. I may

Re: Re: Performance Question And Problem

2006-11-23 Thread John Kopanas
That is awesome... thanks. I still am not sure exactly though why this take 2 seconds while my methond took over a minute for the same amount of rows. In essence don't the two methods do the same things? On 11/23/06, mos <[EMAIL PROTECTED]> wrote: At 05:50 PM 11/23/2006, you wrote: >I have the

Re: Performance Question And Problem

2006-11-23 Thread Dan Nelson
In the last episode (Nov 23), John Kopanas said: > I have the following query: > > UPDATE companies c > SET >total_annual_service_charge = > ( >SELECT SUM(annual_service_charge) >FROM purchased_services ps WHERE ps.company_id = c.id > );

Re: Performance Question And Problem

2006-11-23 Thread mos
At 05:50 PM 11/23/2006, you wrote: I have the following query: UPDATE companies c SET total_annual_service_charge = ( SELECT SUM(annual_service_charge) FROM purchased_services ps WHERE ps.company_id = c.id ); It takes 1s to run when I ha

Performance Question And Problem

2006-11-23 Thread John Kopanas
I have the following query: UPDATE companies c SET total_annual_service_charge = ( SELECT SUM(annual_service_charge) FROM purchased_services ps WHERE ps.company_id = c.id ); It takes 1s to run when I have two tables of 500 rows, 4s with t