вообщем у меня такой вопрос. что лучще, несколько запросов, или один. к примеру, у меня на главной, счётики для гости, форума, обмена и тд. я составил такой запрс:
___
SELECT COUNT(*) as `upload_count`,
SUM(`size`) as `upload_size`,
(SELECT COUNT(*) FROM `upload` WHERE `day` = ".date("d.m.y",time())." AND `type`='file') as `upload_new`,
(SELECT COUNT(*) FROM `users`) as `users_count`,
(SELECT COUNT(*) FROM `guest`) as `guest_count`,
(SELECT COUNT(*) FROM `achat`) as `achat_count`,
(SELECT COUNT(*) FROM `quotes` WHERE `mod` = 1) as `quotes_count`,
(SELECT `time` FROM `news` ORDER BY `id` DESC LIMIT 1) as `news_time`,
(SELECT `id` FROM `news` ORDER BY `id` DESC LIMIT 1) as `news_id`,
(SELECT `text` FROM `news` ORDER BY `id` DESC LIMIT 1) as `news_text`,
(SELECT COUNT(*) FROM `forum` WHERE `type` = 'themes') as `forum_themes`,
(SELECT COUNT(*) FROM `forum` WHERE `type` = 'massage') as `forum_massage` FROM `upload` WHERE `type` = 'file'
---
так вот, лучше разделить его, или оставить как есть?