1. Perform a query with nothing but a COUNT(…) to determine how many record are in your segment.
2. If more than 100,000, make the segment smaller.
3. Make sure you check every SuiteQL query before you run it.
4. Index through the dates in your WHERE clause to make sure you always have less than 100,000 results.
5. Index through the offset to return your the items for your query.