| 2499 | |
| 2500 | #ifdef OPT_DEBUG_RETRIEVAL |
| 2501 | void Retrieval::printCandidate(const InversionCandidate* candidate) const |
| 2502 | { |
| 2503 | optimizer->printf(" cost (%1.2f), selectivity (%1.10f), indexes (%d), matched (%d, %d)", |
| 2504 | candidate->cost, candidate->selectivity, candidate->indexes, candidate->matchedSegments, |
| 2505 | candidate->nonFullMatchedSegments); |
| 2506 | |
| 2507 | if (candidate->unique) |
| 2508 | optimizer->printf(", unique"); |
| 2509 | |
| 2510 | if (candidate->dependentFromStreams.hasData()) |
| 2511 | { |
| 2512 | optimizer->printf(", dependent from streams:"); |
| 2513 | |
| 2514 | const auto end = candidate->dependentFromStreams.end(); |
| 2515 | for (auto iter = candidate->dependentFromStreams.begin(); iter != end; iter++) |
| 2516 | { |
| 2517 | const auto name = optimizer->getStreamName(*iter); |
| 2518 | |
| 2519 | if (name.hasData()) |
| 2520 | optimizer->printf(" %u (%s)", *iter, name.c_str()); |
| 2521 | else |
| 2522 | optimizer->printf(" %u", *iter); |
| 2523 | |
| 2524 | if (iter != end - 1) |
| 2525 | optimizer->printf(","); |
| 2526 | } |
| 2527 | } |
| 2528 | |
| 2529 | optimizer->printf("\n"); |
| 2530 | } |
| 2531 | |
| 2532 | void Retrieval::printCandidates(const InversionCandidateList& inversions) const |
| 2533 | { |