lyndsiesal Posted December 18, 2019 Share Posted December 18, 2019 Is there a way to see when the last time a customer logged in was? My database is 10+ years old and I've managed to delete customer accounts who had 0 orders and were older than 1 year but I'm still left with nearly 80K customer accounts. I think it would be great if I could reduce my database further by deleting customer accounts who have not logged in in the past 5 years or so. My database lags so badly that I can't view statistics or do any type of exports and I'd really like to start exploring ways to pare it down. Link to comment Share on other sites More sharing options...
bsmither Posted December 18, 2019 Share Posted December 18, 2019 Not that I'm aware of. That many database records is a pittance for the power of MySQL. We can also assume your hosting environment equipment isn't that old. Others on the forum will suggest that the database seems to be in need of proper indexing. Link to comment Share on other sites More sharing options...
lyndsiesal Posted December 18, 2019 Author Share Posted December 18, 2019 My store is a download store so the orders and download records are in the millions. I switched from an older dedicated server to a new VPS about a year ago, hoping for some improvement but no luck. The other thing I'd like to try to do is find a way to identify and delete possible orphaned download and order records. Maybe the database is getting stuck looking for something that might not be there? I just don't know. My downloads table has 1,299,799 records and order inventory is at 1,300,401. I don't know if that discrepancy is significant or not but they should match considering everything I sell is a download, right? Link to comment Share on other sites More sharing options...
bsmither Posted December 18, 2019 Share Posted December 18, 2019 The discrepancy surely is a curiosity! Link to comment Share on other sites More sharing options...
havenswift-hosting Posted December 18, 2019 Share Posted December 18, 2019 That is certainly a larger number of records than most but as Brian said, tables with millions of records should not ever be an issue if the tables are indexed correctly - with unique indexes and correctly written queries, finding one record from a thousand records would only be marginally quicker than find the same one from ten million records Link to comment Share on other sites More sharing options...
lyndsiesal Posted January 4, 2020 Author Share Posted January 4, 2020 Does anyone happen to know if there is a guide to indexing the tables? Link to comment Share on other sites More sharing options...
bsmither Posted January 4, 2020 Share Posted January 4, 2020 We would ask, in what context? Here is some technical documentation: https://dev.mysql.com/doc/refman/5.6/en/optimization-indexes.html With respect to what CubeCart recommends, there is a list that is used in admin, Maintenance, Database tab -- the list is found in the admin file /sources/maintenance.index.inc.php, starting at around line 557. Link to comment Share on other sites More sharing options...
lyndsiesal Posted January 4, 2020 Author Share Posted January 4, 2020 Thanks, @bsmither All of my indexes say "OK" so I have no idea what the problem is with this one site. I have a few other CC shops on the same server with no issues but of course they don't have monster databases. Hmmmm Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.