Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
i see....this is my very ideea too, start prospecting on solutions, not just worrying about hdd space, db size etc. but I didn't know how to put it right in my question. I need to know before i launch the website if, at some point in the future, I can migrate to other optimised solutions, because site will build up and everything needs to be flexible in adapting to optimized solutions. thanks :)
thanks for the excellent advices. For the beginning it's definitely safe to keep images (folder tree) and DB (mySql InnoDB tables) on one server, it has 60GB ssd Raid 1 and 3 GB ram with pretty powerful processor. For low income hosting it's best what I got. But in the long run, I think I will need. Q : Why raid 10 for mysql volume ? THe hosting has raid 1, and since it's SSD good qual Intel i guess, it's super fast. In the long run i'll probably switch to raid 1 with 7200 rpm standard hdd, since it encases more space and it's not expensive. or maybe ssd on my own server..
i considered using InnoDB for row-locking (not table). The site uses a lot of AJAX small updates (like the Like button on Facebook) and also not very frequent regular INSERTS, and a lot of READS. Pictures are being kept in the tree folder, and database is only text and numbers used to display stuff on the frontpage. I also have 2 separate admins, which will bring a lot of traffic and also the browsing through the stuff they define, on the frontpage which will bring a lot of reads on the httpd and mysql side.
$query_list_records = "SELECT COUNT(*) from (SELECT * from myl_news_comments WHERE news_id=? LIMIT ? OFFSET ?) A"; this will select the count well and displaying total with $total_records = $result_list_records->fetchColumn();
now it's working. I took your comment's advice and fiddled a bit with the code...so instead of GROUP BY p.product_sku I wrote GROUP BY s.active, p.product_sku. And now it displays as before with the ability of getting the s.active field in the row data. Thanks !!