Forum Discussion

setis's avatar
setis
Post Partisan
6 years ago
Solved

Querying a large table

I have a large table that usually starts importing right away. 

 

When I try to query it to filter the date, the step called "Navigation" disappears the query is evaluating for 30 min before it starts importing. 

 

The sql I'm using is:

SELECT *
FROM [XXX].[dbo].[Stats]
where Alias = 'Customer1'
and time_key >'20200314'

 

Am I doing anything wrong?

 

Thanks in advance

  • Hi setis , 

    If you run this query in SSMS or other tool, will it run 30 mins? Try to optimize the query (don't use *, try to use column names...) before querying. In addition, you also could load the entire table, then filter it in Power Query to see whether it work or not. Or you could use SQL profiler to monitor its performance and see which part cause more time. Or you could try direct query to see whether it will faster or not.

     

    Best Regards,
    Zoe Zhi

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

1 Reply

  • dax's avatar
    dax
    Community Support

    Hi setis , 

    If you run this query in SSMS or other tool, will it run 30 mins? Try to optimize the query (don't use *, try to use column names...) before querying. In addition, you also could load the entire table, then filter it in Power Query to see whether it work or not. Or you could use SQL profiler to monitor its performance and see which part cause more time. Or you could try direct query to see whether it will faster or not.

     

    Best Regards,
    Zoe Zhi

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.