[Tickets #7363] Re: Avoid bitwise operations in the SQL Share driver

bugs at horde.org bugs at horde.org
Thu Oct 9 07:13:46 UTC 2008


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/7363
------------------------------------------------------------------------------
  Ticket             | 7363
  Updated By         | Duck <duck at obala.net>
  Summary            | Avoid bitwise operations in the SQL Share driver
  Queue              | Horde Framework Packages
  Version            | FRAMEWORK_3
  Type               | Enhancement
  State              | Accepted
  Priority           | 2. Medium
  Milestone          |
  Patch              | 1
  Owners             | Horde Developers, Chuck Hagenbuch
------------------------------------------------------------------------------


Duck <duck at obala.net> (2008-10-09 03:13) wrote:

ACTUAL QUERY  - time: 2.062
SELECT DISTINCT s.*  FROM ansel_shares s  LEFT JOIN ansel_shares_users  
AS u ON u.share_id = s.share_id WHERE ( (s.share_owner = 'duck' OR  
(s.perm_creator & 2) != 0 OR (s.perm_default & 2) != 0 OR ( u.user_uid  
= 'duck' AND (u.perm & 2) != 0))  AND attribute_images > 2) AND  
(s.share_parents = '' OR s.share_parents IS NULL) ORDER BY s.share_id  
DESC

FLAT CRITERIA - time: 2.031
SELECT DISTINCT s.*  FROM ansel_shares s  LEFT JOIN ansel_shares_users  
AS u ON u.share_id = s.share_id WHERE ( (s.share_owner = 'duck' OR  
(s.perm_creator_show = 1) OR (s.perm_default_show = 1) OR ( u.user_uid  
= 'duck' AND u.perm_show = 1))  AND attribute_images > 2) AND  
(s.share_parents = '' OR s.share_parents IS NULL) ORDER BY s.share_id  
DESC

WITHOUT PARENTELS IF NOT NEEDED  - time: 1.964
SELECT DISTINCT s.*  FROM ansel_shares s  LEFT JOIN ansel_shares_users  
AS u ON u.share_id = s.share_id WHERE ( (s.share_owner = 'duck' OR  
s.perm_creator_show = 1  OR s.perm_default_show = 1  OR ( u.user_uid =  
'duck' AND u.perm_show = 1 ))  AND attribute_images > 2) AND  
(s.share_parents = '' OR s.share_parents IS NULL) ORDER BY s.share_id  
DESC

JOIN CIRTERIA OUT OF WHERE  - time: 1.9208
SELECT DISTINCT s.*  FROM ansel_shares s  LEFT JOIN ansel_shares_users  
AS u ON u.share_id = s.share_id AND u.user_uid = 'duck' AND  
u.perm_show = 1 WHERE ( (s.share_owner = 'duck' OR s.perm_creator_show  
= 1  OR s.perm_default_show = 1) AND attribute_images > 2) AND  
(s.share_parents = '' OR s.share_parents IS NULL) ORDER BY s.share_id  
DESC






More information about the bugs mailing list