1. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

[SQL] MySqlConnector.MySqlException: 'Out of sort memory, consider increasing server sort...

Discussão em 'Outras Linguagens' iniciado por Stack, Novembro 6, 2024 às 09:52.

  1. Stack

    Stack Membro Participativo

    I am developing an e-commerce website using ASP.NET 6 MVC and MySQL is my database. This is my sp to get the data of all the products

    CREATE DEFINER=`root`@`localhost` PROCEDURE `product_list`()
    BEGIN
    SELECT
    p.p_code AS ProductCode,
    p.p_name AS ProductName,
    p.category AS Category,
    SUM(pv.stock) AS TotalStock,
    i.i_name AS ImageName
    FROM
    tbl_products p
    JOIN
    tbl_productvariants pv ON p.p_Id = pv.product_id
    JOIN
    (
    SELECT product_id, i_name
    FROM tbl_images
    WHERE (product_id, i_id) IN (
    SELECT product_id, MIN(i_id)
    FROM tbl_images
    GROUP BY product_id
    )
    ) i ON p.p_Id = i.product_id
    GROUP BY
    p.p_Id, p.p_code, p.p_name, p.category, i.i_name
    ORDER BY
    p.p_Id;
    END


    when I am calling this sp from ASP.NET, it is showing out of sort memory error

    I have tried to make changes in my.cnf file

    [mysqld] sort_buffer_size = 2M

    Continue reading...

Compartilhe esta Página