rand () daha hızlı mysql php fonksiyonu

0 Cevap php

Nasıl duvar kağıtları rastgele seçmek, ancak (performans nedenlerle) 10 saniye boyunca son seçilen birini önbelleğe mi?

the faster RAND() function use Cache in wallpapers or image I use this but I need to but cache in image timely change after 1 mins or 5 mins to change images in RAND() randoms wallpapers

ben bu kullanın:

$sql_wallpaper = "SELECT SQL_CACHE * FROM `wallpaper` 
                  WHERE wallpaperid >= 
                  (SELECT FLOOR( MAX(wallpaperid) * RAND()) FROM `wallpaper` ) 
                  ORDER BY wallpaperid LIMIT 0,7";

but i think its not faster ... It's not using the cache

0 Cevap