Part of my work is QA for data in some remote SQL servers. And I’m only granted to query data.
Everyday, I have to execute some SQL scripts to query data in each column of every table. These tables are holding data collected by some programs day by day. I only need to query data in the latest week. Since the huge amount of data and not all fields are indexed, some of my query always timeout.
Does anyone have any good idea to help me out? Really appreciate.
use a where Clause on your query which filters out data for the last week only
and
Request for an index on all columns u want to access…