SQL query to select million records quickly

后端 未结 4 1026
[愿得一人]
[愿得一人] 2021-02-04 22:03

I want to select million records from a table and I am using select query for this.

Currently it is taking a few minutes to get data. Can I get it quickly?<

4条回答
  •  失恋的感觉
    2021-02-04 22:23

    Best way Fast Performance Tips for SQL Usiing SELECT Statements

       1:- Check Indexes. 
       2:- There should be indexes on all fields used in the WHERE and JOIN portions of the SQL statement
       3:-  Limit Size of Your Working Data Set.
       4:-  Only Select Fields You select as Need.
       5:- Remove Unnecessary Table and index 
       6:- Remove OUTER JOINS. 
       7:-  Remove Calculated Fields in JOIN and WHERE Clauses.
    

提交回复
热议问题