Hello,
He/she wanted that they helped me in solving a mnovedad that I have since
with the Sql 7.0 it becomes very slow when I generate a consultation to a
chart of about 850000 registrations
Next I put them the sentence that is executed.
SELECT ESTVEN_vendedor,CXCCLI_codigo,ESTNIV_nivel4,INVITM_codigo,
ESTUBA_unidbase,ESTUBA_unibasedev,ESTUBA_unibaserec,ESTUVO_univolum,
ESTUVO_univoldev,ESTUVO_univolrec,
SUM(ESTCFU_cantifunci), SUM(ESTLOC_valorloc),
SUM(ESTBAL_valorbal),SUM(ESTIMP_impuloc),
SUM(ESTPES_peso), SUM(ESTIMP_impubal),
SUM(ESTDES_descloc),SUM(ESTDES_descbal),
SUM(ESTCOS_costoloc), SUM(ESTCOS_costobal),
SUM(ESTCFU_cantfundev),SUM(ESTBAL_valbaldev),
SUM(ESTLOC_vallocdev), SUM(ESTIMP_impulocdev),
SUM(ESTIMP_impubaldev),SUM(ESTDES_desclocdev),
SUM(ESTDES_descbaldev), SUM(ESTPES_pesodev),SUM(ESTCOS_costlocdev),
SUM(ESTCOS_costbaldev),
SUM(ESTVOL_volumen),
SUM(ESTVOL_volumendev),SUM(ESTCFU_cantfunrec),SUM(ESTBAL_valbalrec),
SUM(ESTLOC_vallocrec), SUM(ESTIMP_impulocrec),
SUM(ESTIMP_impubalrec),SUM(ESTDES_desclocrec),
SUM(ESTDES_descbalrec),SUM(ESTCOS_costlocrec), SUM(ESTCOS_costbalrec),
SUM(ESTPES_pesorec),
SUM(ESTVOL_volumenrec),SUM(ESTFAC_numero), SUM(ESTDEV_numero),
SUM(ESTREC_numero)
FROM ESTE_ESTDISTICAS (NOLOCK)
GROUP BY
ESTVEN_vendedor,CXCCLI_codigo,ESTNIV_nivel4,INVITM_codigo,
ESTUBA_unidbase,ESTUBA_unibasedev,
ESTUBA_unibaserec,ESTUVO_univolum,ESTUVO_univoldev,
ESTUVO_univolrec
In the personal thing I don't believe that the slowness of the consultation
is for the Harward of it schemes it but well I think that it is for some bad
configuration of the team or for the some service pack.
Good he/she wanted them to help me with that inconvenience that I have.
Thank you.
Hi
Without DDL for the tables and example data it is hard to comment see
http://www.aspfaq.com/etiquettXe.asp?id=5006 and
example data as insert statements http://vyaskn.tripod.com/code.Xhtm#inserts
You will need to look at the query plan and check out the indexes that are
being used. Make sure that the indexes are appropriate and are not fragmented
(DBCC SHOWCONTIG) and that the statistics are up-to-date. You may want to
look at the Index Tuning wizard to see if that will provide any suggestions.
John
"Jems" wrote:
> Hello,
> He/she wanted that they helped me in solving a mnovedad that I have since
> with the Sql 7.0 it becomes very slow when I generate a consultation to a
> chart of about 850000 registrations
> Next I put them the sentence that is executed.
>
> SELECT ESTVEN_vendedor,CXCCLI_codigo,ESTNIV_nivel4,INVITM_codigo,
> ESTUBA_unidbase,ESTUBA_unibasedev,ESTUBA_unibaserec,ESTUVO_univolum,
> ESTUVO_univoldev,ESTUVO_univolrec,
> SUM(ESTCFU_cantifunci), SUM(ESTLOC_valorloc),
> SUM(ESTBAL_valorbal),SUM(ESTIMP_impuloc),
> SUM(ESTPES_peso), SUM(ESTIMP_impubal),
> SUM(ESTDES_descloc),SUM(ESTDES_descbal),
> SUM(ESTCOS_costoloc), SUM(ESTCOS_costobal),
> SUM(ESTCFU_cantfundev),SUM(ESTBAL_valbaldev),
> SUM(ESTLOC_vallocdev), SUM(ESTIMP_impulocdev),
> SUM(ESTIMP_impubaldev),SUM(ESTDES_desclocdev),
> SUM(ESTDES_descbaldev), SUM(ESTPES_pesodev),SUM(ESTCOS_costlocdev),
> SUM(ESTCOS_costbaldev),
> SUM(ESTVOL_volumen),
> SUM(ESTVOL_volumendev),SUM(ESTCFU_cantfunrec),SUM(ESTBAL_valbalrec),
> SUM(ESTLOC_vallocrec), SUM(ESTIMP_impulocrec),
> SUM(ESTIMP_impubalrec),SUM(ESTDES_desclocrec),
> SUM(ESTDES_descbalrec),SUM(ESTCOS_costlocrec), SUM(ESTCOS_costbalrec),
> SUM(ESTPES_pesorec),
> SUM(ESTVOL_volumenrec),SUM(ESTFAC_numero), SUM(ESTDEV_numero),
> SUM(ESTREC_numero)
> FROM ESTE_ESTDISTICAS (NOLOCK)
> GROUP BY
> ESTVEN_vendedor,CXCCLI_codigo,ESTNIV_nivel4,INVITM_codigo,
> ESTUBA_unidbase,ESTUBA_unibasedev,
> ESTUBA_unibaserec,ESTUVO_univolum,ESTUVO_univoldev,
> ESTUVO_univolrec
> In the personal thing I don't believe that the slowness of the consultation
> is for the Harward of it schemes it but well I think that it is for some bad
> configuration of the team or for the some service pack.
> Good he/she wanted them to help me with that inconvenience that I have.
> Thank you.
No comments:
Post a Comment