| | |
Wordpress, Joins and Indexes
Please support our MySQL advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Aug 2007
Posts: 1
Reputation:
Solved Threads: 0
Greetings. My first post.
I'm running a fairly popular wordpress blog (about a million page views a month).
I have a plugin called "recent comments" which lists the last 20 or so comments in the sidebar of the site. However, the queries it makes are very disk and CPU intensive. It's Joining two very large tables together (left join). It takes the post title, author and an excerpt of the comment and melds them together.
These joins cannot be cached in memory because they contain TEXT columns. I was wondering if anyone knew if I could create some kind of index to help speed up these queries. They're killing my site really, and I do not want to remove this functionality from the site.
I was considering re-structuring the way "recent comments" and "recently commented" items are displayed (i.e., separately, instead of via a Joined query and temp table.. but I'm at a loss here.
Any suggestions?
I'm running a fairly popular wordpress blog (about a million page views a month).
I have a plugin called "recent comments" which lists the last 20 or so comments in the sidebar of the site. However, the queries it makes are very disk and CPU intensive. It's Joining two very large tables together (left join). It takes the post title, author and an excerpt of the comment and melds them together.
These joins cannot be cached in memory because they contain TEXT columns. I was wondering if anyone knew if I could create some kind of index to help speed up these queries. They're killing my site really, and I do not want to remove this functionality from the site.
I was considering re-structuring the way "recent comments" and "recently commented" items are displayed (i.e., separately, instead of via a Joined query and temp table.. but I'm at a loss here.
Any suggestions?
![]() |
Similar Threads
- Joins (MySQL)
- nested joins, from mdb. Possible? (Visual Basic 4 / 5 / 6)
- need help optimizing (MS SQL)
- Problem with Rewriting Subqueries as Joins (Database Design)
- Problem with Rewriting Subqueries as Joins (MS SQL)
- WordPress Calendar CSS, anchor problem (HTML and CSS)
- Indexes? (Database Design)
Other Threads in the MySQL Forum
- Previous Thread: INSERT INTO doing double duty
- Next Thread: Query on a large table too slow
| Thread Tools | Search this Thread |
agplv3 amazon api artisticlicense aws bizspark breathalyzer camparingtocolumns changingprices cmg communityjournalism contentmanagement contractors copyright count court crm database design developer development distinct drupal dui ec2 email enterprise eudora facebook form foss gartner gnu government gpl greenit groklaw groupware hiring hyperic images innerjoins insert ip joebrockmeier join journalism keyword keywords kickfire laptop law legal license licensing linux managing mariadb matchingcolumns metron micromanage microsoft microsoftexchange mindtouch montywidenius mozilla multiple music mysql mysqlcolumnupdating mysqlindex mysqlinternalqueries mysqlquery mysqlsearch news open-xchange opendatabasealliance opengovernment opensource oracle penelope php priceupdating query referencedesign reorderingcolumns resultset saas select sharepoint simpledb sourcecode spotify sql sugarcrm syntax techsupport thunderbird transparency virtualization





