Closed (fixed)
Project:
Google Sitemap
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
29 Oct 2007 at 08:29 UTC
Updated:
12 Nov 2007 at 22:42 UTC
The query
INSERT INTO gsitemap (nid, last_changed, pid)
SELECT n.nid, n.changed, u.pid FROM beta_node n
LEFT JOIN gsitemap g ON n.nid = g.nid
LEFT JOIN url_alias u ON u.src = CONCAT('node/', n.nid)
and g.nid IS NULL;can't be executed on my host.
Using explain over the select I get that mysql wont use an index for node table (wich size is 12754 records) and alias table will be full scaned (about 168063 records)
Right now I'm executing the query splited by node ranges, 200 each time.
Comments
Comment #1
darren ohMust be a database configuration issue. In issue 166716, this query was tested on a site with over 30,000 nodes. I personally tested this query on a site with over 12,000 nodes.
Comment #2
niteman commentedRight now I've achvieve to fill my gsitemap table runnig the avobe query by sets of 500 nodes, but I still can't get the sitemap to be shown.
Might it be related with the database engine I'm using?
Queries like:
Takes about 30 seconds each.
Or:
Taking more than 200 secs.
All involved tables are INNODB and the site is allways under hevy load (from 90 to 160 registered users and about 200 anonymous)
Thank you in advance
Comment #3
darren ohThis module has not been tested before with InnoDB, so that could be the problem. InnoDB is known to be slower. If fewer hosting providers insisted on restricting their service to MySQL, we could just use PostgreSQL and save a lot of trouble. It may be that the only solution for InnoDB is to provide a configuration form where the site administrator can set how many links can be retrieved per query.
Comment #4
niteman commentedI have speeded my sites greatly switching to innodb most of my tables (same as drupal.org have done), but if needed i can switch back some of the involved tables. Witch do you suggest me? (NOTE: this is a production site, as I can't simulate the user load)
BTW, can be thoose issues related with taxonomy_access?
Comment #5
niteman commentedI've switched back my node_access table to MyISAM and the issue is solved (no idea of what is the real cause).
Thank you very much for your support, most times just sharing your issue with others and their points of view is the key.
Comment #6
darren ohInnoDB is only faster if many users are writing to the database at the same time. Try running your queries through db_rewrite_sql() to see what taxonomy access is doing to them.
Comment #7
niteman commentedThe queries I posted already have been rewrited. In my site switching tables to INNODB have proved to speed it in general, especially sessions and user tables.
I'will leave node_access table as MyISAM althougt.
Thanks again
Comment #8
niteman commentedComment #9
(not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.