rajmohan Posted January 30, 2009 Share Posted January 30, 2009 Hi All, I am having one table which is having more then 100 millions of records... I have written a query like this.. for example.. SELECT COUNT(*) FROM tbl_name where user_id='XXXX' (The use of this query is to count how many hit happen by this users. ) When I execute this query it crashes my database.. please help me. Now I need a very best solution to solve this problem.. Link to comment https://forums.phpfreaks.com/topic/143094-database-crash-happened-because-of-select-query-need-a-help/ Share on other sites More sharing options...
landavia Posted January 30, 2009 Share Posted January 30, 2009 it seem your table are corrupt i would suggest you to repair.. but before worse happen.. try copy your table 1st then repair the table.. better create backup or lost data. Link to comment https://forums.phpfreaks.com/topic/143094-database-crash-happened-because-of-select-query-need-a-help/#findComment-750459 Share on other sites More sharing options...
rajmohan Posted January 30, 2009 Author Share Posted January 30, 2009 How to find whether the table is corrupt or not.. Link to comment https://forums.phpfreaks.com/topic/143094-database-crash-happened-because-of-select-query-need-a-help/#findComment-750460 Share on other sites More sharing options...
rajmohan Posted January 30, 2009 Author Share Posted January 30, 2009 I am using the storage engine "MYISAM".. Whether because of this may occur some problem... Link to comment https://forums.phpfreaks.com/topic/143094-database-crash-happened-because-of-select-query-need-a-help/#findComment-750461 Share on other sites More sharing options...
landavia Posted January 30, 2009 Share Posted January 30, 2009 >>How to find whether the table is corrupt or not.. u can't.. but something like that.. (fail select).. related to crash data >>I am using the storage engine "MYISAM".. actualy.. type don't related to the table corrupt or not i have DB using MYISAM.. is already fail after a year, but there more old.. not crash.. is only a matter of luck i believe Link to comment https://forums.phpfreaks.com/topic/143094-database-crash-happened-because-of-select-query-need-a-help/#findComment-750466 Share on other sites More sharing options...
fenway Posted February 2, 2009 Share Posted February 2, 2009 What does "CHECK TABLES" say? Link to comment https://forums.phpfreaks.com/topic/143094-database-crash-happened-because-of-select-query-need-a-help/#findComment-752441 Share on other sites More sharing options...
Mchl Posted February 2, 2009 Share Posted February 2, 2009 >>I am using the storage engine "MYISAM".. actualy.. type don't related to the table corrupt or not Actually it is. Different storage engines fail in different ways. InnoDB for example can fix itself most of the times without user ever noticing it failed. Link to comment https://forums.phpfreaks.com/topic/143094-database-crash-happened-because-of-select-query-need-a-help/#findComment-752444 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.