Candidate Records
Candidate Records
{key1, seq=10}
{key2, seq=15}
{key3, seq=20}
{key4, seq=5}
{key5, seq=30}
{key1, seq=10}...
Min-Heap
Min-Heap
{key1, seq=10}
{key2, seq=15}
{key3, seq=20}
{key1, seq=10}...
Final Min-Heap
Final Min-Heap
{key2, seq=15}
{key3, seq=20}
{key5, seq=30}
{key2, seq=15}...
Query: Secondary Key "tag1", K = 3
Query: Secondary Key "tag1", K = 3
Step 1: Insert Top 3 to Min-Heap
Step 1: Insert Top 3 to Min-Heap
Step 2: Compare and Replace
Step 2: Compare and Replace
Result: {key5, key3, key2}
Result: {key5, key3, key2}
Text is not SVG - cannot display