SELECT client_id, invoice_id, invoice_status, invoice_date FROM invoices WHERE client_id IN (123, 567) AND invoice_status != 'PAID';
The DB engine can scan the index, finding all the pages in the table that contain rows with one of those two client_ids in.
It requests these pages as soon as it finds them in the index.
It scans the pages in the order it finds them completed, though, which can be a completely different order than it requested them in.
The DB engine can scan the index, finding all the pages in the table that contain rows with one of those two client_ids in.
It requests these pages as soon as it finds them in the index.
It scans the pages in the order it finds them completed, though, which can be a completely different order than it requested them in.