0
The query below returns a DataTables
with approximately 400 database items Mysql
. The difficulty is to return these values faster. Currently it takes on average 70 seconds to fully display the list. It is a low number of items even so there is a great delay. There is possibility to improve performance through the SELECT
?
SELECT
p.*,
pc.*,
u.name as autor, u.surname
FROM
`product` p
INNER JOIN
`product_config` pc ON p.id = pc.id_product
LEFT JOIN
`users` u ON u.id = p.idAutor
ORDER BY
p.id DESC
Do you really need to select everything (*) in two tables? Are you sure the bottleneck is the query? If you run select 'from the outside' does it also take? How are the indexes in this table?
– Genos
@Genos made the selection only of the useful fields in the Datatables assembly and didn’t really have much change in loading. One of the columns displayed the product image, I removed this information and the performance changed dramatically. I believe it has something to do with uploading images to Datatables, as it waits for all elements to be uploaded.
– Dagobe
@Dagobe you came to use the plugin’s Processing server-side functionality?
– Cesar Augusto
@Cesar no. What I did was take an image of the product I was carrying in one of the columns.
– Dagobe