Howto speed up your SQL queries

  • SELECT a single random item:
    SELECT @lines:=COUNT(id) FROM azn_items;
    SET @rand = CEILING( RAND() * @lines );
    SELECT * FROM azn_items WHERE (@rand:=@rand-1) + id = id;
  • Tags
    Comments
    Write the first comment
    Leave a trace
    Name *
    Email *
    Website
    Anti SPAM * Code (6 + 9) =
    Leave me a comment *
     
    All comments are subject to editorial review
    Post being viewed right now
    Item date: 15.05.2009
    Views: 817
    Item date: 26.09.2009
    Views: 1621
    Item date: 10.04.2009
    Views: 476
    Item date: 16.06.2009
    Views: 399
    Item date: 13.05.2009
    Views: 1215
    Item date: 15.05.2009
    Views: 506
    Item date: 19.07.2009
    Views: 1767
    Item date: 19.07.2009
    Views: 1153
    Item date: 07.08.2010
    Views: 780