

![]() |
| | LinkBack | Thread Tools | Display Modes |
| |||
| I noticed that in the database there is no index on the link_status column in the pligg_links table. Almost every page load on the entire site includes 2 queries of this column, so adding an index on this column should provide a noticable improvement. I'm just launching my site now so I can't say how much, but it will definitely help. Once you have 1000+ stories in your Pligg site, having no index on this column has to be a killer. |
| |||
| This makes total sense. While I've done my share of php, I hadn't quite gotten into MySQL performance tweaks yet, but this seems consistent with everthing I've read. When some more knowledgable dudes confirm it, I'll write a blog on PliggPower.com. Thanks! Brandon |
| |||
| "Almost every page load on the entire site includes 2 queries of this column, so adding an index on this column should provide a noticable improvement." Wow! so how does one go about solving this :-/ |
| ||||
| I'm going to work on the queries this weekend. Looking at the query.log there are a couple things that need to be worked on. |
| |||
| It's a give and take scenario. It speeds up select queries, but if you're doing an update or insert, not only are you updating the data, but the database has to update the indexes as well. For all intents and purposes, this is generally a good idea. You figure for every record update for a semi busy pligg site, you're going to do 100-500 reads, so the overhead trade off on record updates is worth it, IMO. I'm going to implement this myself shortly. EDIT: I personally didn't see a major improvement, but it was noted. If somebody has time to do speed tests, I'd be interested. Last edited by Atma; 11-01-2007 at 10:09 AM. |
| ||||
| Quote:
|
| |||
| nothingman - To add the index just issue the following in mysql (via your servers admin panel, SSH, etc): alter table pligg_links add index(link_status); |
| |||
| Okay, so what's the verdict? Should everyone add an index or is this a case by case basis? Brandon |
| ||||
| Please wait for a few days - Ash would be providing a significant update on the indexes and database optimizations - he has mentioned this at the top of this thread. |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Pligg Donation Drive 2009 | chuckroast | Questions and Comments | 0 | 03-23-2009 05:42 PM |
| Pligg integration with SMF Forum | autoinc | Questions and Comments | 64 | 05-19-2008 03:22 AM |