Port deactivate boost hangs forever
Ryan Schmidt
ryandesign at macports.org
Thu Nov 13 04:27:20 PST 2014
On Nov 13, 2014, at 5:28 AM, Clemens Lang wrote:
> On 13 Nov, 2014, at 10:56, Ryan Schmidt wrote:
>
>> That definitely helped. Now deactivate takes 12 seconds, activate takes 19
>> seconds.
>
> OK, so one of the queries we do during activation uses a suboptimal query plan,
> possibly because it uses an index that isn't very useful for the query. The
> analyze command gathers statistical data on indices which is used by the query
> planner to choose a better execution plan.
>
> Maybe that's the reason why I can no longer reproduce the problem.
>
> Can you run and provide the output of:
Sure...
> DROP TABLE sqlite_stat1;
> EXPLAIN QUERY PLAN SELECT id FROM files WHERE actual_path=? AND active;
0|0|0|SEARCH TABLE files USING INDEX file_actual (actual_path=?)
> EXPLAIN QUERY PLAN UPDATE files SET actual_path=?, active=1 WHERE path=? AND id=?;
0|0|0|SEARCH TABLE files USING INDEX file_path (path=?)
> ANALYZE;
> SELECT * FROM sqlite_stat1;
portgroups||5654
dependencies|dep_name|15535 5
files|file_actual|748885 2
files|file_path|748885 2
files|file_port|748885 128
ports|port_state|5886 2943
ports|port_url|5886 5886 421 5 4 4
ports|port_name|5886 2 2 2 2 1
ports|sqlite_autoindex_ports_2|5886 5886 421 5 4 4
ports|sqlite_autoindex_ports_1|5886 2 2 2 2 1
metadata|sqlite_autoindex_metadata_1|2 1
> EXPLAIN QUERY PLAN SELECT id FROM files WHERE actual_path=? AND active;
0|0|0|SEARCH TABLE files USING INDEX file_actual (actual_path=?)
> EXPLAIN QUERY PLAN UPDATE files SET actual_path=?, active=1 WHERE path=? AND id=?;
0|0|0|SEARCH TABLE files USING INDEX file_path (path=?)
More information about the macports-dev
mailing list