Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 website making a large amount of SQL commands...

Author  Topic 

tomh134
Starting Member

2 Posts

Posted - 2014-07-29 : 13:46:34
Hi All,

to start off id just like to say i am a complete noobie with regard to SQL. I have been in contact with my Hosting provider who have told me that my website seems to be making a large amount of SQL commands, and locking the tables. I have tried searching for solutions however have not yet found a solution. I would appreciate any help with this topic.

Thanks for your time

Tom

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2014-07-29 : 13:52:31
They'll need to provide more detail. Why does it matter if you are locking tables? Aren't the locks inside your database and not a shared database?

You can run a trace if you have permissions to see what's going on.

Tara Kizer
SQL Server MVP since 2007
http://weblogs.sqlteam.com/tarad/
Go to Top of Page

tomh134
Starting Member

2 Posts

Posted - 2014-07-29 : 14:28:29
Hi Tara,

This started from me reviving multiple Internal Server Errors and Resource Limit Reached messages every time i tried editing anything within my website. Then one of the staff sent me this as a reply, though i do not really understand what i am supposed to do to resolve it.

Thanks

Tom


They sent me this:

Your website seems to be making a large amount of SQL commands, and locking the tables. Can you take a look?


2170259 printin1_qtoa415 localhost printin1_qtoa415 Query 83 Sending data UPDATE qtoa_words AS x, (SELECT qtoa_words.wordid, COUNT(qtoa_contentwords.wordid) AS contentcount F
2170283 printin1_qtoa415 localhost printin1_qtoa415 Query 75 Waiting for table metadata lock LOCK TABLES qtoa_words WRITE
2170313 printin1_qtoa415 localhost printin1_qtoa415 Query 75 Waiting for table metadata lock SELECT word, tagcount FROM qtoa_words JOIN (SELECT wordid FROM qtoa_words WHERE tagcount>0 ORDER BY
2170343 printin1_qtoa415 localhost printin1_qtoa415 Query 70 Waiting for table metadata lock SELECT word, tagcount FROM qtoa_words JOIN (SELECT wordid FROM qtoa_words WHERE tagcount>0 ORDER BY
2170351 printin1_qtoa415 localhost printin1_qtoa415 Query 69 Waiting for table metadata lock SELECT word, tagcount FROM qtoa_words JOIN (SELECT wordid FROM qtoa_words WHERE tagcount>0 ORDER BY
2170359 printin1_qtoa415 localhost printin1_qtoa415 Query 68 Waiting for table metadata lock (SELECT '0' AS selectkey, qtoa_categories.categoryid, qtoa_categories.parentid, qtoa_categories.titl
2170364 printin1_qtoa415 localhost printin1_qtoa415 Query 67 Waiting for table metadata lock (SELECT '0' AS selectkey, qtoa_categories.categoryid, qtoa_categories.parentid, qtoa_categories.titl
2170366 printin1_qtoa415 localhost printin1_qtoa415 Query 67 Waiting for table metadata lock SELECT word, tagcount FROM qtoa_words JOIN (SELECT wordid FROM qtoa_words WHERE tagcount>0 ORDER BY
2170371 printin1_qtoa415 localhost printin1_qtoa415 Query 67 Waiting for table metadata lock (SELECT '0' AS selectkey, qtoa_categories.categoryid, qtoa_categories.parentid, qtoa_categories.titl
2170375 printin1_qtoa415 localhost printin1_qtoa415 Query 66 Waiting for table metadata lock (SELECT '0' AS selectkey, qtoa_categories.categoryid, qtoa_categories.parentid, qtoa_categories.titl
2170376 printin1_qtoa415 localhost printin1_qtoa415 Query 66 Waiting for table metadata lock (SELECT '0' AS selectkey, qtoa_categories.categoryid, qtoa_categories.parentid, qtoa_categories.titl
2170377 printin1_qtoa415 localhost printin1_qtoa415 Query 66 Waiting for table metadata lock (SELECT '0' AS selectkey, qtoa_categories.categoryid, qtoa_categories.parentid, qtoa_categories.titl
2170378 printin1_qtoa415 localhost printin1_qtoa415 Query 66 Waiting for table metadata lock (SELECT '0' AS selectkey, qtoa_categories.categoryid, qtoa_categories.parentid, qtoa_categories.titl
2170402 printin1_qtoa415 localhost printin1_qtoa415 Query 61 Waiting for table metadata lock SELECT word, tagcount FROM qtoa_words JOIN (SELECT wordid FROM qtoa_words WHERE tagcount>0 ORDER BY
2170424 printin1_qtoa415 localhost printin1_qtoa415 Query 56 Waiting for table metadata lock SELECT word, tagcount FROM qtoa_words JOIN (SELECT wordid FROM qtoa_words WHERE tagcount>0 ORDER BY
2170476 printin1_qtoa415 localhost printin1_qtoa415 Query 35 Waiting for table metadata lock (SELECT '0' AS selectkey, qtoa_categories.categoryid, qtoa_categories.parentid, qtoa_categories.titl
2170487 printin1_qtoa415 localhost printin1_qtoa415 Query 35 Waiting for table metadata lock (SELECT '0' AS selectkey, qtoa_categories.categoryid, qtoa_categories.parentid, qtoa_categories.titl
2170509 printin1_qtoa415 localhost printin1_qtoa415 Query 35 Waiting for table metadata lock SELECT word, tagcount FROM qtoa_words JOIN (SELECT wordid FROM qtoa_words WHERE tagcount>0 ORDER BY
2170531 printin1_qtoa415 localhost printin1_qtoa415 Query 28 Waiting for table metadata lock SELECT word, tagcount FROM qtoa_words JOIN (SELECT wordid FROM qtoa_words WHERE tagcount>0 ORDER BY
2170540 printin1_qtoa415 localhost printin1_qtoa415 Query 27 Waiting for table metadata lock (SELECT '0' AS selectkey, qtoa_categories.categoryid, qtoa_categories.parentid, qtoa_categories.titl
2170542 printin1_qtoa415 localhost printin1_qtoa415 Query 27 Waiting for table metadata lock (SELECT '0' AS selectkey, qtoa_categories.categoryid, qtoa_categories.parentid, qtoa_categories.titl
2170554 printin1_qtoa415 localhost printin1_qtoa415 Query 26 Waiting for table metadata lock (SELECT '0' AS selectkey, qtoa_categories.categoryid, qtoa_categories.parentid, qtoa_categories.titl
2170561 printin1_qtoa415 localhost printin1_qtoa415 Query 25 Waiting for table metadata lock (SELECT '0' AS selectkey, qtoa_categories.categoryid, qtoa_categories.parentid, qtoa_categories.titl
2170563 printin1_qtoa415 localhost printin1_qtoa415 Query 25 Waiting for table metadata lock (SELECT '0' AS selectkey, qtoa_categories.categoryid, qtoa_categories.parentid, qtoa_categories.titl
2170564 printin1_qtoa415 localhost printin1_qtoa415 Query 25 Waiting for table metadata lock (SELECT '0' AS selectkey, qtoa_categories.categoryid, qtoa_categories.parentid, qtoa_categories.titl
2170565 printin1_qtoa415 localhost printin1_qtoa415 Query 24 Waiting for table metadata lock (SELECT '0' AS selectkey, qtoa_categories.categoryid, qtoa_categories.parentid, qtoa_categories.titl
2170571 printin1_qtoa415 localhost printin1_qtoa415 Query 23 Waiting for table metadata lock SELECT word, tagcount FROM qtoa_words JOIN (SELECT wordid FROM qtoa_words WHERE tagcount>0 ORDER BY
2170577 printin1_qtoa415 localhost printin1_qtoa415 Query 21 Waiting for table metadata lock SELECT word, tagcount FROM qtoa_words JOIN (SELECT wordid FROM qtoa_words WHERE tagcount>0 ORDER BY
2170594 printin1_qtoa415 localhost printin1_qtoa415 Query 16 Waiting for table metadata lock SELECT word, tagcount FROM qtoa_words JOIN (SELECT wordid FROM qtoa_words WHERE tagcount>0 ORDER BY
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2014-07-29 : 16:07:51
Can you post the actual queries and we can help optimize them? What they provided is cutoff.

Tara Kizer
SQL Server MVP since 2007
http://weblogs.sqlteam.com/tarad/
Go to Top of Page
   

- Advertisement -