I’d see whether there’s a way to convince it to return the record with the max timestamp that meets your criteria. If you know you only want one and it’s always the newest, it might work better.
I’d see whether there’s a way to convince it to return the record with the max timestamp that meets your criteria. If you know you only want one and it’s always the newest, it might work better.
Not as pretty but likely uses your index and executes faster.
Not as pretty but likely uses your index and executes faster.
Question will be whether that limit value is too high for whatever is receiving your files.
Question will be whether that limit value is too high for whatever is receiving your files.
Maybe start doubling that limit and get an explain plan to n the query. There has to be a point where it’s cheaper to use the index.
Maybe start doubling that limit and get an explain plan to n the query. There has to be a point where it’s cheaper to use the index.
Another thought - if you are exporting only a subset of the table, create a memory table based on your index columns and then export from that?
Another thought - if you are exporting only a subset of the table, create a memory table based on your index columns and then export from that?