[Kde-pim] Review Request 112977: revert commit d59b46d

Cédric Villemain cedric at 2ndQuadrant.com
Sat Sep 28 12:25:04 BST 2013


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/112977/
-----------------------------------------------------------

Review request for Akonadi.


Description
-------

Recent PostgreSQL (9.2+) can re-evaluate execution plan based on values to bind to a query.

I suppose that the original fix from Till Adam intend to fix some bad query but I didn't find examples or references to that.

The fix was constructing a nested loop in all case. PostgreSQL can do better because nested loop is not everytime the best plan.

(It also happens to fix some weird behavior I got after moving from BYTEA to TEXT).

     
    Author: Till Adam <adam at kde.org>
    Date:   Mon Aug 27 14:29:29 2012 +0200
    
        Speed up statistics queries from O(n^2) behavior by avoiding a double inner join.
    
        On Postgres 9.1 the query that uses two inner joins to limit the results
        to collections with items with certain flags (like SEEN) is extremely
        inefficient, for as yet unknown reasons. To work around this, we filter
        manually by leveraging an in-memory cache of flag names to ids and using
        those ids to filter.
    
        Approved by vkrause.


Diffs
-----

  server/src/handlerhelper.cpp 85282cb23a750ded3e68245c26a5a9e1e6c04612 

Diff: http://git.reviewboard.kde.org/r/112977/diff/


Testing
-------


Thanks,

Cédric  Villemain

_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/


More information about the kde-pim mailing list