4images Forum & Community

4images Help / Hilfe => FAQ, Tips => Topic started by: Chris on June 17, 2003, 04:41:48 PM

Title: Pages load very slowly
Post by: Chris on June 17, 2003, 04:41:48 PM
This was really just copied from a post made by Jan and edited slightly for clarity.  :wink:
--------------------------------------------------------------------------------------

If you have a lot of images in your database, the random category image and random image are very expensive database queries because of "RAND()" in the ORDER BY clause.

Open includes/constants.php and try changing
Code: [Select]
define('SHOW_RANDOM_CAT_IMAGE', 1);
to
Code: [Select]
define('SHOW_RANDOM_CAT_IMAGE', 0);
This disables the category related random image.


If this does not help, change
Code: [Select]
define('SHOW_RANDOM_IMAGE', 1);
to
Code: [Select]
define('SHOW_RANDOM_IMAGE', 0);
This will disable the random image completely.