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
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
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
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
> );
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
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