Skip to main content
edited tags
Link
Phrancis
  • 20.4k
  • 6
  • 68
  • 154
edited body; edited title
Source Link
200_success
  • 144.2k
  • 22
  • 188
  • 473

Is For a two stagequery over multiple databases, is it faster to do GROUP BY offirst or UNION more efficient than a flat GROUP BYfirst?

The xTables are stored in separate databases named by the year (this siis by third party-party design and I cannot change it). There are 3 databases in my case but it could be say up to 10. Each of the tables contains about 2500 records with about 300 distinct xID values.

Is a two stage GROUP BY of UNION more efficient than a flat GROUP BY?

The xTables are stored in separate databases named by the year (this si by third party design and I cannot change it). There are 3 databases in my case but it could be say up to 10. Each of the tables contains about 2500 records with about 300 distinct xID values.

For a query over multiple databases, is it faster to do GROUP BY first or UNION first?

The xTables are stored in separate databases named by the year (this is by third-party design and I cannot change it). There are 3 databases in my case but it could be say up to 10. Each of the tables contains about 2500 records with about 300 distinct xID values.

Which of the following Is a two T-SQL views is more efficient? Two stage GROUP BY of UNION ormore efficient than a flat GROUP BY?

edited tags
Source Link
Vogel612
  • 25.3k
  • 7
  • 58
  • 141
Loading
Source Link
pepr
  • 283
  • 2
  • 5
  • 15
Loading