2
80765 | localhost | Query | 135 | Locked | UPDATE pligg_links set link_summary='', link_title_url='-165999', link_url='OMIT' |

| 80781 | localhost | Query | 143 | Sending data | SELECT * FROM pligg_links

| 80861 | localhost | Query | 135 | Locked | SELECT link_id, link_category, link_title, link_title_url, COUNT(tag_link_id) AS relevance, tag_link |

| 80872 | localhost | Query | 134 | Locked | SELECT count(*) from pligg_links where link_status = "queued" |

This last one goes on & on... same process it seems. Pligg's support is pretty sparse and I've been trying to solve these issues for days.

Would anyone know an edit I can make either within PHPMyAdmin, a php file or inside Pligg to cut this out?

Secret ninja password: SHOW CREATE TABLE pligg_links\G

Thank you!

entrprnr
  • 55
  • 6
  • 1
    Just curious how many rows are in pligg_links? Is it an InnoDB table? – drew010 Jan 25 '12 at 04:21
  • pligg_links has about 130k rows. I don't know if it is an InnoDB table; how would I find out? Thank you – entrprnr Jan 25 '12 at 04:28
  • A `SHOW TABLE STATUS WHERE Name = 'pligg_links'` should show the `ENGINE` which tells you what type. Probably MyISAM or InnoDB. – drew010 Jan 25 '12 at 04:30
  • If you also add a `SHOW CREATE TABLE pligg_links\G` to the question as well that could be helpful. – drew010 Jan 25 '12 at 04:31
  • Asking my host now - did you mean to add that line to my question here on S.O.? – entrprnr Jan 25 '12 at 04:34
  • You can run it from phpMyAdmin. Yes, if you could add the output from the `SHOW CREATE TABLE pligg_links\G` to the question it could be helpful. – drew010 Jan 25 '12 at 04:36
  • Ok, adding it now - and I can't even access cPanel, they suspended my account. :/ – entrprnr Jan 25 '12 at 04:41

1 Answers1

2

Change the table engine to InnoDB (phpMyAdmin can help you do this), as this lets you use row-level locking.

On top of that, run this immediately after mysql_connect():

mysql_query( "SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED");

That mouthful will allow SELECT queries to run even if an UPDATE is running, by reading the rows before they get updated if they have to. In most cases, this is fine - it's only if you're dealing with majorly important issues like ones that involve money that you need to be careful.

Niet the Dark Absol
  • 320,036
  • 81
  • 464
  • 592
  • I just want to let you know I successfully did what you suggested; it seems like it may have helped but waiting for confirmation from my host. Thank you! – entrprnr Jan 25 '12 at 18:43
  • Hello, it appears everything is running well now. Thank you very much for your help! – entrprnr Feb 05 '12 at 00:39