Forum Discussion
Anonymous
4 years agoNot applicable
Direct query using count distinct hitting database for every row
Hi I have the following issue: We have a table which we connec to using DirectQuery (onsite web events table), which is connect to an imported table with user information. We show a table of ...
lbendlin
Super User
4 years agoIs the field name ( NIQUE_ID ) any indication of the column type? Is this the primary key in the table? If yes then changing COUNT(DISTINCT) to COUNT() should yield the same result and is likely a lot faster.
If you use Direct Query then your data source needs to be ready and able to handle gazillions of queries. If the data source cannot support that then you should consider switching to Import Mode.