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
    Leave me a comment *
     
    All comments are subject to editorial review
    Post being viewed right now
    Item date: 04.02.2009
    Views: 753
    Item date: 25.09.2009
    Views: 273
    Item date: 04.02.2009
    Views: 660
    Item date: 03.01.2009
    Views: 1811
    Item date: 22.08.2009
    Views: 1931
    Item date: 17.06.2009
    Views: 1070
    Item date: 14.05.2009
    Views: 669
    Item date: 14.05.2009
    Views: 684
    Item date: 05.02.2009
    Views: 729
    Item date: 13.05.2009
    Views: 1647