[dev] datatree performance (again)

Duck duck at obala.net
Mon Jan 16 06:01:12 PST 2006


As I know not.
I catch the 


On Monday 16 January 2006 14:45, Didi Rieder wrote:
> Hi,
>
> as far as I know I disabled all shareing prefs for turba, nag and
> kronolith. IMP also doesn't use tasks.
> But my database retuns over 32,000 rows for each the folowing queries:
>
> select count(*) from horde_datatree where horde_datatree.group_uid =
> 'horde.shares.nag';
>
> select count(*) from horde_datatree where horde_datatree.group_uid =
> 'horde.shares.kronolith';
>
> And I see many queries of the following type:
>
> SELECT c.datatree_id, c.datatree_name
> FROM horde_datatree c
> LEFT JOIN horde_datatree_attributes a1 ON a1.datatree_id = c.datatree_id
> WHERE c.group_uid = 'horde.shares.kronolith'
> AND (
> (
> a1.attribute_name = 'owner'
> AND a1.attribute_value = 'misch at sbox'
> )
> OR (
> a1.attribute_name = 'perm_users'
> AND a1.attribute_key = 'misch at sbox'
> AND a1.attribute_value &2
> )
> OR (
> a1.attribute_name = 'perm_creator'
> AND a1.attribute_value &2
> )
> OR (
> a1.attribute_name = 'perm_default'
> AND a1.attribute_value &2
> )
> )
> GROUP BY c.datatree_id, c.datatree_name, c.datatree_order
> ORDER BY c.datatree_order, c.datatree_name, c.datatree_id;
>
> SELECT c.datatree_id, c.datatree_name
> FROM horde_datatree c
> LEFT JOIN horde_datatree_attributes a1 ON a1.datatree_id = c.datatree_id
> WHERE c.group_uid = 'horde.shares.nag'
> AND (
> (
> a1.attribute_name = 'owner'
> AND a1.attribute_value = 'xxx at xxx'
> )
> OR (
> a1.attribute_name = 'perm_users'
> AND a1.attribute_key = 'xxx at xxx'
> AND a1.attribute_value &2
> )
> OR (
> a1.attribute_name = 'perm_creator'
> AND a1.attribute_value &2
> )
> OR (
> a1.attribute_name = 'perm_default'
> AND a1.attribute_value &2
> )
> )
> GROUP BY c.datatree_id, c.datatree_name, c.datatree_order
> ORDER BY c.datatree_order, c.datatree_name, c.datatree_id;
>
> Those queries take about 8 seconds to complete and are bringing the
> MySql server to its knees.
>
> Is there something I missed in the configuration that would turn off
> those queries?
>
> Didi
>
> --
> -------------------------
> Didi Rieder
> adrieder at sbox.tugraz.at
> PGPKey ID: 3431D0B0
> -------------------------


More information about the dev mailing list