MySQL Forums
Forum List  »  General

How increase VIEW speed
Posted by: Giovanni Chiozza
Date: December 23, 2016 06:48AM

Hello,

I got a php application that uses a SELECT over a VIEW .
Everything is really slow to load and user has to wait a bit everytime the query run.

SELECT
Id_row_P,
AREA,
Responsabile,
Opportunita,
Gara,
Prov,
Tipo,
ValoreK,
Anno,
Mese,
Perc_Successo,
Potenz,
Fatt_potenziale_annuo,
Note_1,
Note_2,
Referente_1,
Referenze_2,
History,
Linea_P,
Strumento_Prodotto_P,
Numero_P
FROM
pipeline_view
WHERE AREA IN (***list of divisions****)
ORDER BY Id_row_P DESC


Created by this query

CREATE VIEW view_name AS
SELECT
pipeline.Id_row AS Id_row_P,
pipeline.AREA AS AREA,
pipeline.Responsabile AS Responsabile,
pipeline.Opportunita AS Opportunita,
pipeline.Gara AS Gara,
pipeline.Prov AS Prov,
pipeline.Tipo AS Tipo,
pipeline.ValoreK AS ValoreK,
pipeline.Anno AS Anno,
pipeline.Mese AS Mese,
pipeline.Perc_Successo AS Perc_Successo,
pipeline.Potenz AS Potenz,
pipeline.Fatt_potenziale_annuo AS Fatt_potenziale_annuo,
pipeline.Note_1 AS Note_1,
pipeline.Note_2 AS Note_2,
pipeline.Referente_1 AS Referente_1,
pipeline.Referenze_2 AS Referenze_2,
pipeline.History AS History,
pipeline_products.Linea AS Linea_P,
pipeline_products.product_desc AS Strumento_Prodotto_P,
pipeline_products.nr AS Numero_P
FROM
pipeline
LEFT OUTER JOIN pipeline_products ON pipeline.Id_row = pipeline_products.Id_row
GROUP BY
pipeline.Id_row
ORDER BY
`pipeline`.`Id_row` DESC

Options: ReplyQuote


Subject
Written By
Posted
How increase VIEW speed
December 23, 2016 06:48AM
December 23, 2016 10:37AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.