how much time do you think that executing around 70 queries that are similar to this one should take to complete?
consider that the sum will become of about 250,000 records for each querie.
Right now it takes like 4 minutes to do
the task, and i'm really concerned about the performance, unfortunately either i do it with sum or i make the addition manually record by record (already tried) and it will take even longer.
Is there anything to improve the performance of SQL Server 2k, SP3 ??
consider that the sum will become of about 250,000 records for each querie.
select sum(br1_kwh),sum(br1_impener)+sum(br1_impmant)+sum(br1_imp_iva)+sum(br1_imp_dap)+sum(br1_imp_sub)+sum(br1_imp_car)+sum(br1_imp_cre)+sum(br1_imp_dep)+sum(br1_dif_mas)-sum(br1_dif_menos) from regs1 where br1_tipo='0' and br1_area='"&areasub&"' and br1_tarifa='"&tarifasub&"' and br1_fecha_cob>='"&fechinic1sub&"' and br1_fecha_cob<='"&fechfin2sub&"';
Right now it takes like 4 minutes to do
the task, and i'm really concerned about the performance, unfortunately either i do it with sum or i make the addition manually record by record (already tried) and it will take even longer.
Is there anything to improve the performance of SQL Server 2k, SP3 ??