Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
HOWTO: Use MySQL as a DB backend to Portage
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
shane
n00b
n00b


Joined: 05 Oct 2002
Posts: 12

PostPosted: Fri Oct 28, 2005 8:55 am    Post subject: Possible minor speed-up? Reply with quote

With this SELECT:

Code:
SELECT name, data from `package_name` WHERE `cat_id` ='%d' AND `path_id` = '%d'"


Since neither cat_id nor path_id is indexed, this will do a full table scan. (I know they are part of a compound index, but if the leftmost component of the index is not in the WHERE clause, then the index is not used.)

Doing:

Code:
ALTER TABLE package_name ADD INDEX (cat_id);
ALTER TABLE package_name ADD INDEX (path_id);


Should help a bit.
Back to top
View user's profile Send private message
sokhapkin
n00b
n00b


Joined: 13 Jan 2005
Posts: 38
Location: N Ft Myers, FL

PostPosted: Sat Jun 10, 2006 1:51 am    Post subject: Reply with quote

This mysql module does not work with portage 2.1... Any chance to make it working with 2.1? Without the module "emerge -uDa world" stays in "Calculating world dependencies" stage forever.
_________________
Sergey Okhapkin
http://www.callwithus.com
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Goto page Previous  1, 2, 3
Page 3 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum