[kronolith] performance on large systems

John Madden jmadden at ivytech.edu
Tue Nov 17 20:38:08 UTC 2009


> This is the open bug:
> http://bugs.horde.org/ticket/7363
> 
> If you have optimized SQL queries for PostgreSQL, it would be great to  
> get this sorted once and for all.

I'm thinking about shoe-horning this into the kronolith code:

SELECT DISTINCT s.* FROM kronolith_shares s WHERE s.share_id IN

(SELECT share_id FROM kronolith_shares_groups WHERE group_uid IN (SELECT 
group_uid FROM horde_groups_members WHERE user_uid='jmadden') AND perm & 
2 <> 0)

OR s.share_id IN

(SELECT s.share_id FROM kronolith_shares s WHERE s.share_id IN (SELECT 
share_id FROM kronolith_shares_users WHERE user_uid='jmadden' AND perm & 
2 <> 0))

OR s.share_id IN

(SELECT s.share_id FROM kronolith_shares s WHERE s.share_owner='jmadden');

In my testing so far that's producing the same output as the stock query 
but it's doing so in ~65ms instead of ~1200ms.  Obviously I'd have to 
fit that to match the string substitutions, but other than that, would 
the above work?

John




-- 
John Madden
Sr UNIX Systems Engineer
Ivy Tech Community College of Indiana
jmadden at ivytech.edu


More information about the kronolith mailing list