Home › Forums › Legacy Support › Support queries › How-to & Troubleshooting › Need to delete unused questions
Tagged: Quiz Questions
- This topic has 18 replies, 4 voices, and was last updated 8 years, 5 months ago by Anshuman Sahu.
-
AuthorPosts
-
May 15, 2016 at 2:52 pm #48211balajee2777ParticipantHi we have accidently loaded wrong questions using csv files. we are talking of deleting 10,000 questions. Can I have a sql where by I can pass the Question ID. The SQL has to check that the question is not used in any quiz and delete's if it is not used. We are unable to access Questions from the front hand with the number of questions we have. Regards JayMay 16, 2016 at 10:56 am #48355Anshuman SahuKeymasterWell you have to delete them manually coz i am not sure that the query will work properly and if something goes wrong you will end up having no question at all . It would be better if you delete theme form all question page using bulk action . refer : http://prntscr.com/b4n617May 16, 2016 at 8:07 pm #48399balajee2777Participanthi Alex, The Question page has been written in such a way that it pulls all the question as a array. We have 40,000 quiz questions. Please don't take it in a bad way but as a suggestion for improvement. Hence the page doesn't load for us and hence the question asked. The loaded page doesn't confirm if it is used in a quiz either. Please can i have a better suggestion. Regards JayMay 17, 2016 at 11:20 am #48541Anshuman SahuKeymasterI am sorry but that would not be possible. If your site is not loading 40000 question then how can it run query which will check if each question id is present in quiz meta or not . It will be a very heavy query that is definitely going to crash your site . Also the all questions page is core wordpress page and wplms theme does not interfere in it and it provides option to load how many posts in one page .It does not usually loads all your 40000 questions . refer : http://prntscr.com/b52bpt Unfortunately this is not related to the theme. the only solution i would suggest to increase your php limit (contact webhost ) and then delete the questions by yourself . Checking which questions are added in which quiz is not available as of now . System just sets an string of question id in quiz meta and checking each quiz for each question will be really a very very heavy query .May 17, 2016 at 7:38 pm #48620balajee2777ParticipantThanks Alex... Saying it is not a theme question is very draf... If you are unable to sort a query then I am sure you can raise it to second level support. I am definately sure some one would be capable over there to write a sql query. Please don't take it in a negative sense. It is a very simple sql that i was expecting. Thanks for your help. Regards JayMay 18, 2016 at 7:12 am #48697H.K. LatiyanParticipantThere is no such second level support here, and as Alex mentioned it is not possible to give you a query for 40,000 questions. Sorry but we cannot help you with this.May 18, 2016 at 8:21 am #48721MrVibeKeymasterThe query you're requesting would put a huge amount of load on your server and most likely it will crash. The number of questions is 10k which itself is huge. Not only do we need to delete the questions but also the connected meta data. I hope you understand the issue and the reluctance in giving you a solution as you ask/suggest because it may not be the solution which will help you. Lastly, Alex & latiyan are correct in pointing out that this is a site specific issue and not related to the theme. the answer to your query would depend upon the number of posts you have in your database. your requested query requires : Searching the field And even further Searching inside a field before deletion and search would put tremendous amount of load. if you have any dynamic quiz then we need to search for user results, as deleted questions would impact the quiz results screen. also please tell why do you want to delete the unused questions ? Unused questions take minimal space and put absolutely 0 load on server. It would be helpful if you can connect the unused questions, is the unused questions connected to an instructor ? Or a question tag ? the question as such requested does not have a viable solution.May 19, 2016 at 10:23 pm #49147balajee2777ParticipantThe query you're requesting would put a huge amount of load on your server and most likely it will crash. The number of questions is 10k which itself is huge. Not only do we need to delete the questions but also the connected meta data. I hope you understand the issue and the reluctance in giving you a solution as you ask/suggest because it may not be the solution which will help you. I was thinking of a sql to delete each question and not all 40,000 in one go. I could have then written a subroutine to call the sql in phpmyadmin to do the job. We could have used the sql to do maybe 50 at a time and check it in sequence and test it hasn't affected any other quiz. Lastly, Alex & latiyan are correct in pointing out that this is a site specific issue and not related to the theme. I have been using th theme to do it and in the assumption that the theme is more than capable of handling at least 10,000 questions. But we have come to a hard stop. We have quiz with no more than 20 questions. When we started testing it with a single user using the quiz would bring the site down with the hosting company mourning about the site using 100% cpu. the answer to your query would depend upon the number of posts you have in your database. We have very less post in our site. You could have a look and suggest if we are doing anything wrong. your requested query requires : Searching the field And even further Searching inside a field before deletion and search would put tremendous amount of load. We haven't made the site live so was thing of just post_meta and post table. if you have any dynamic quiz then we need to search for user results, as deleted questions would impact the quiz results screen. We haven't made the site live so will not worry about results at the moment. also please tell why do you want to delete the unused questions ? Unused questions take minimal space and put absolutely 0 load on server. This is definately good to hear. I was trying to delete the questions as we were in the assumption it takes more resource. But if that is not the case then why does our quiz eat us 100% cpu with just one user testing it. It would be helpful if you can connect the unused questions, is the unused questions connected to an instructor ? Or a question tag ? It is connected to any instructor or any question tags. the question as such requested does not have a viable solution. I would be really greatful if you could visit the site and get back to me on why when even one user using the quiz eats away 100% cpu of the hosted server. We haven't used any other functionality of users. Regards JayMay 22, 2016 at 6:04 am #49591balajee2777Participantwhy no replies to my questions?May 23, 2016 at 9:14 am #49722balajee2777ParticipantIn a nutshell. I am unable to use the quiz with even one user working on it brings the site down. Not sure what is wrong. Can one of you have a look. Regards JayMay 23, 2016 at 1:58 pm #49832balajee2777ParticipantIt has completely bought my website to a grid lock where I can't scale it or take it to general public. Please can you consider as a P1. Please see if I am doing anything wrong. This has become a blocker. Please try to understand I have a business to run and had been waiting for an answer for the past 3 days.. Losing a bit of patience. Please don't take it in a negative way. It is only giving a way for you to improve. Regards JayMay 24, 2016 at 12:48 pm #50032Anshuman SahuKeymasterApologies for late reply .Can you please share your url of that quiz + admin credentials in a private reply to check the issue at your end . Please also share your server php error log .(just share the last 10 to 40 lines of your error log )May 26, 2016 at 4:20 pm #50425balajee2777ParticipantHi Alex, I have been replying to this post for the last 2 days. But somehow the post disappeared. I have marked it as private. Any clues? Regards JayMay 27, 2016 at 12:50 pm #50606Anshuman SahuKeymasterPlease type your response in private reply . do not try to copy paste anything in private replies . Try to paste the content in notepad or some simple text editor and then paste it here . this removes any html or other formatting that is being copied . For the error log simply create a txt file and attach it .May 31, 2016 at 6:44 am #51035balajee2777ParticipantUsername : Dinesh Password : ddinesh2323
-
AuthorPosts
- The topic ‘Need to delete unused questions’ is closed to new replies.