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 (3 + 3) =
    Leave me a comment *
     
    All comments are subject to editorial review
    Post being viewed right now
    Item date: 01.03.2009
    Views: 1797
    Item date: 27.09.2009
    Views: 911
    Item date: 22.08.2009
    Views: 2084
    Item date: 26.09.2009
    Views: 410
    Item date: 26.09.2009
    Views: 526
    Item date: 24.08.2009
    Views: 1653
    Item date: 10.04.2009
    Views: 568
    Item date: 12.04.2009
    Views: 1796
    Item date: 22.08.2009
    Views: 1067
    Item date: 01.01.2009
    Views: 2046