A few questions:
Is there a way to use a query multiple times? I know you can use a CTE but that will be removed after the next query and I do not want to create temp tables on a highly used database.
Is there a best practice for doing searches? For example, if someone searches "SQL" on 10mil rows, I want to return both the paged results but also show categories/total results/etc.
Lastly, is there a way to reduce reads on paging results using "row_number ()" and "between" on large databases? A query that uses 10k reads jumps to 240k reads.
Thanks for the help.
Is there a way to use a query multiple times? I know you can use a CTE but that will be removed after the next query and I do not want to create temp tables on a highly used database.
Is there a best practice for doing searches? For example, if someone searches "SQL" on 10mil rows, I want to return both the paged results but also show categories/total results/etc.
Lastly, is there a way to reduce reads on paging results using "row_number ()" and "between" on large databases? A query that uses 10k reads jumps to 240k reads.
Thanks for the help.
Comment