+ 1

how to optimize the query performance or what are the best practices in sql queries

how to increase the performance of sql or how to optimize the query i am having nearly 5 to 6 tables and each table having millions of records , and i write query & i run it but it is taking too much of time nearly 1-1.5 hour i did some optimization ,that is the smallest table is in inner most query , and is join with 2nd small table ,like that and biggest table is i n outer most query ..ect although i did some alteration it taking 30 -40 min . my intention is to get the result within 10 min To achieve this , what are the optimization methods are there and how to alter the query , or whether i want to use other type of join , if any thing related to this please help me

26th Feb 2018, 4:41 AM
ADITYA AVADHANI M.L
ADITYA AVADHANI M.L - avatar
2 Answers
+ 1
You can try to mess around with SQL's bulk import functions. Bulk Import is optimised for mass data, basically you import a file that contains all of your datarows. This method can achieve massive results. Alternatively you could try using a tool to remove all the space/return chars in your script to speed up compiling. Hope I could help.
26th Feb 2018, 12:46 PM
Kai Schlegel
Kai Schlegel - avatar
0
thank you for quick response I'll try it
26th Feb 2018, 4:59 PM
ADITYA AVADHANI M.L
ADITYA AVADHANI M.L - avatar