Skip to main content
Adrian Tanase's user avatar
Adrian Tanase's user avatar
Adrian Tanase's user avatar
Adrian Tanase
  • Member for 12 years, 6 months
  • Last seen more than 5 years ago
awarded
awarded
awarded
comment
managing a growing database in the long run (10 years from now)
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 :)
comment
managing a growing database in the long run (10 years from now)
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..
comment
managing a growing database in the long run (10 years from now)
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.
Loading…
awarded
awarded
accepted
awarded
comment
PDO count(*) does not work with LIMIT and OFFSET
i wonder tho, what is the A at the end of the statement meaning
awarded
accepted
comment
PDO count(*) does not work with LIMIT and OFFSET
$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();
comment
PDO count(*) does not work with LIMIT and OFFSET
it worked! thanks a lot...i stripped the code meanwhile with ? instead of variable names (:variable) which is just the same
Loading…
awarded
comment
Cannot retrieve values from LEFT JOIN (2 tables)
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 !!
comment
Cannot retrieve values from LEFT JOIN (2 tables)
what should I do ? do you have a reccomendation ? should i GROUP BY p.product_sku, s.active ?