From: <di...@us...> - 2014-07-30 09:54:52
|
Revision: 59935 http://sourceforge.net/p/firebird/code/59935 Author: dimitr Date: 2014-07-30 09:54:45 +0000 (Wed, 30 Jul 2014) Log Message: ----------- Avoid metadata lookups while retrieving the plan (especially important in ASTs). Modified Paths: -------------- firebird/trunk/src/jrd/idx.cpp Modified: firebird/trunk/src/jrd/idx.cpp =================================================================== --- firebird/trunk/src/jrd/idx.cpp 2014-07-30 09:50:33 UTC (rev 59934) +++ firebird/trunk/src/jrd/idx.cpp 2014-07-30 09:54:45 UTC (rev 59935) @@ -1289,26 +1289,17 @@ // fill out a retrieval block for the purpose of // generating a bitmap of duplicate records - IndexRetrieval retrieval; - MOVE_CLEAR(&retrieval, sizeof(IndexRetrieval)); - //retrieval.blk_type = type_irb; - retrieval.irb_index = partner_idx.idx_id; - memcpy(&retrieval.irb_desc, &partner_idx, sizeof(retrieval.irb_desc)); + IndexRetrieval retrieval(partner_relation, &partner_idx, segment, &key); retrieval.irb_generic = irb_equality | (starting ? irb_starting : 0); - retrieval.irb_relation = partner_relation; - retrieval.irb_key = &key; - retrieval.irb_upper_count = retrieval.irb_lower_count = segment; if (starting && segment < partner_idx.idx_count) retrieval.irb_generic |= irb_partial; - if (partner_idx.idx_flags & idx_descending) { + if (partner_idx.idx_flags & idx_descending) retrieval.irb_generic |= irb_descending; - } + if ((idx->idx_flags & idx_descending) != (partner_idx.idx_flags & idx_descending)) - { BTR_complement_key(&key); - } RecordBitmap* bitmap = NULL; BTR_evaluate(tdbb, &retrieval, &bitmap, NULL); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |