Saturday, February 25, 2012

Question - SQL - Help - Pleased

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, ESTU
BA_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_valba
ldev),
SUM(ESTLOC_vallocdev), SUM(ESTIMP_impulocdev),
SUM(ESTIMP_impubaldev), SUM(ESTDES_descl
ocdev),
SUM(ESTDES_descbaldev), SUM(ESTPES_pesodev), SUM(ESTCOS_costlocd
ev),
SUM(ESTCOS_costbaldev),
SUM(ESTVOL_volumen),
SUM(ESTVOL_volumendev), SUM(ESTCFU_cantf
unrec), SUM(ESTBAL_valbalrec),
SUM(ESTLOC_vallocrec), SUM(ESTIMP_impulocrec),
SUM(ESTIMP_impubalrec), SUM(ESTDES_descl
ocrec),
SUM(ESTDES_descbalrec), SUM(ESTCOS_costl
ocrec), SUM(ESTCOS_costbalrec),
SUM(ESTPES_pesorec),
SUM(ESTVOL_volumenrec), SUM(ESTFAC_numer
o), 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, ESTU
VO_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/etiquett_e.asp?id=5006 and
example data as insert statements [url]http://vyaskn.tripod.com/code._htm#inserts[/url
]
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 fragmente
d
(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, EST
UBA_unibaserec, ESTUVO_univolum,
> ESTUVO_univoldev, ESTUVO_univolrec,
> SUM(ESTCFU_cantifunci), SUM(ESTLOC_valorloc),
> SUM(ESTBAL_valorbal), SUM(ESTIMP_impulo
c),
> SUM(ESTPES_peso), SUM(ESTIMP_impubal),
> SUM(ESTDES_descloc), SUM(ESTDES_descbal
),
> SUM(ESTCOS_costoloc), SUM(ESTCOS_costobal),
> SUM(ESTCFU_cantfundev), SUM(ESTBAL_valb
aldev),
> SUM(ESTLOC_vallocdev), SUM(ESTIMP_impulocdev),
> SUM(ESTIMP_impubaldev), SUM(ESTDES_descl
ocdev),
> SUM(ESTDES_descbaldev), SUM(ESTPES_pesodev), SUM(ESTCOS_costlocd
ev),
> SUM(ESTCOS_costbaldev),
> SUM(ESTVOL_volumen),
> SUM(ESTVOL_volumendev), SUM(ESTCFU_cant
funrec), SUM(ESTBAL_valbalrec),
> SUM(ESTLOC_vallocrec), SUM(ESTIMP_impulocrec),
> SUM(ESTIMP_impubalrec), SUM(ESTDES_descl
ocrec),
> SUM(ESTDES_descbalrec), SUM(ESTCOS_cost
locrec), SUM(ESTCOS_costbalrec),
> SUM(ESTPES_pesorec),
> SUM(ESTVOL_volumenrec), SUM(ESTFAC_nume
ro), 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, EST
UVO_univoldev,
> ESTUVO_univolrec
> In the personal thing I don't believe that the slowness of the consultatio
n
> is for the Harward of it schemes it but well I think that it is for some b
ad
> 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