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

[SQL] Do I need to add an Index on ORDER BY field?

Discussão em 'Outras Linguagens' iniciado por Stack, Outubro 10, 2024 às 08:22.

  1. Stack

    Stack Membro Participativo

    I have a query of such like

    $query = "SELECT * FROM tbl_comments WHERE id=222 ORDER BY comment_time";


    Do I need to add an index on the comment_time field?

    Also, if I want to get the data between two dates then how should I build the index?

    Continue reading...

Compartilhe esta Página