Thanks for your help first of all!
Here is the query I am using during the installation of the extension to populate my table.
It is still "incomplete" (as you know) but the "slowness" started when started using
Same method is also used on another query with the same slowness...
Before that any installations I've done are almost "instantaneous".
And I don't know if this would still be a problem if it was installed on a "physical" server or at least on a machine (virtual or not) with more resources.
Code: Select all
ignore_groups = $phpbb_container->get('auth');
$administrators = $ignore_groups->acl_get_list(false, 'a_', false);
$admin_ary = (!empty($administrators['a_'])) ? $administrators['a_'] : array();
$moderators = $ignore_groups->acl_get_list(false, 'm_', false);
$mod_ary = (!empty($moderators['m_'])) ? $moderators['m_'] : array();
$admin_mod_array = implode(', ', array_unique(array_merge($admin_ary, $mod_ary)));
// AND p.group_id NOT IN (1,4,5,6)
$sql = 'INSERT INTO ' . $this->table_prefix . $this->schema_name . ' (user_id, username)
SELECT user_id, username FROM `' . USERS_TABLE . '` p
WHERE from_unixtime(p.user_lastvisit) < DATE_SUB(NOW(), INTERVAL 30 DAY)
AND (p.user_type <> ' . USER_FOUNDER . ')
AND (p.user_type <> ' . USER_IGNORE . ')
AND (p.user_id > ' . ANONYMOUS . ')
AND (p.user_id NOT IN ('. $admin_mod_array .'))';
$result = $this->sql_query($sql);
Thanks again for your time!