View | Details | Raw Unified | Return to bug 20447
Collapse All | Expand All

(-)a/Koha/OAI/Server/ListBase.pm (-10 / +5 lines)
Lines 90-105 sub GetRecords { Link Here
90
        # but avoiding joins or subqueries makes this so much faster that it does not matter.
90
        # but avoiding joins or subqueries makes this so much faster that it does not matter.
91
        if ( $include_items && !$deleted )  {
91
        if ( $include_items && !$deleted )  {
92
            $sql = "
92
            $sql = "
93
                (SELECT biblionumber
93
                (SELECT biblionumber FROM $table main WHERE $where $order_limit)
94
                FROM $table main
95
                WHERE $where $order_limit)
96
                  UNION
94
                  UNION
97
                (SELECT DISTINCT(biblionumber) FROM deleteditems main JOIN biblio USING (biblionumber) WHERE $where
95
                (SELECT DISTINCT(biblionumber) FROM deleteditems main JOIN biblio USING (biblionumber) WHERE $where $order_limit)
98
                $order_limit)
99
                  UNION
96
                  UNION
100
                (SELECT DISTINCT(biblionumber) FROM holdings main WHERE $where $order_limit)
97
                (SELECT DISTINCT(biblionumber) FROM holdings main WHERE $where $order_limit)
101
                  UNION
98
                  UNION
102
                (SELECT DISTINCT(biblionumber) FROM items main WHERE $where $order_limit)";
99
                (SELECT DISTINCT(biblionumber) FROM items main WHERE $where $order_limit)
100
            ";
103
            push @bind_params, @part_bind_params;
101
            push @bind_params, @part_bind_params;
104
            push @bind_params, @part_bind_params;
102
            push @bind_params, @part_bind_params;
105
            push @bind_params, @part_bind_params;
103
            push @bind_params, @part_bind_params;
Lines 119-127 sub GetRecords { Link Here
119
            ";
117
            ";
120
        } else {
118
        } else {
121
            $sql = "
119
            $sql = "
122
                SELECT biblionumber
120
                SELECT biblionumber FROM $table main WHERE $where
123
                FROM $table main
124
                WHERE $where
125
            ";
121
            ";
126
122
127
            $ts_sql = "SELECT max(timestamp) FROM $table WHERE biblionumber = ?";
123
            $ts_sql = "SELECT max(timestamp) FROM $table WHERE biblionumber = ?";
128
- 

Return to bug 20447