Need to delete unused questions

Home Forums Legacy Support Support queries How-to & Troubleshooting Need to delete unused questions

Viewing 15 posts - 1 through 15 (of 19 total)
  • Author
    Posts
  • #48211
    balajee2777
    Participant
    Hi 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 Jay
    #48355
    Anshuman Sahu
    Keymaster
    Well 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/b4n617
    #48399
    balajee2777
    Participant
    hi 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 Jay
    #48541
    Anshuman Sahu
    Keymaster
    I 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 .
    #48620
    balajee2777
    Participant
    Thanks 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 Jay
    #48697
    H.K. Latiyan
    Participant
    There 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.
    #48721
    MrVibe
    Keymaster
    The 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.  
    #49147
    balajee2777
    Participant
    The 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 Jay
    #49591
    balajee2777
    Participant
    why no replies to my questions?
    #49722
    balajee2777
    Participant
    In 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 Jay  
    #49832
    balajee2777
    Participant
    It 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 Jay    
    #50032
    Anshuman Sahu
    Keymaster
    Apologies 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 )
    #50425
    balajee2777
    Participant
    Hi 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 Jay    
    #50606
    Anshuman Sahu
    Keymaster
    Please 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 .
    #51035
    balajee2777
    Participant
    Username : Dinesh Password : ddinesh2323
Viewing 15 posts - 1 through 15 (of 19 total)
  • The topic ‘Need to delete unused questions’ is closed to new replies.