Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: Column Hierarchies filtered to segment_number = 0 #108

Open
m-kovalsky opened this issue Dec 20, 2023 · 8 comments
Open

Question: Column Hierarchies filtered to segment_number = 0 #108

m-kovalsky opened this issue Dec 20, 2023 · 8 comments

Comments

@m-kovalsky
Copy link

m-kovalsky commented Dec 20, 2023

Why does the logic for column hierarchies filter to segment_number = 0? (see from line 830 in the code below)

@marcosqlbi
Copy link
Collaborator

The sad reality is that I don't remember.
I guess that segment 1 (which is the only one that appears) is not significant most of the time; this way, we didn't have to aggregate rows with a minimal impact on accuracy.
But it's my guess reviewing the code after so many years.

@m-kovalsky
Copy link
Author

Thanks for the reply, Marco. Yes, I noticed that segment 0 contains a relatively high value and segment 1 contains a small value. Would it be more accurate to do a sum of these values? I wouldn't think it would be too much of a burden on performance.

@marcosqlbi
Copy link
Collaborator

Does it really matter? :)
I'm not even sure that the value displayed is meaningful. If you can ask Akshai, he might know whether it is worth the effort (in the long term, we might also have to change the implementation by using the new INFO functions in DAX...)

@m-kovalsky
Copy link
Author

Not sure how much it matters. Just was looking at the code and thought it was odd that it had that filter. Hmm, interesting about the new info functions. It would be great to have dax.guide updated with syntax examples for these functions. For instance, how to select specific columns and place filters on them (and of course the basic 'SELECT *' code below).

EVALUATE
INFO.TABLES()

@marcosqlbi
Copy link
Collaborator

The problem is always the time!
Are you willing to contribute? Send me examples by email, I'll include them!

@m-kovalsky
Copy link
Author

At this point, it wouldn't be possible to replace DMVs with INFO functions for vertipaq analyzer as the INFO functions is missing the DISCOVER_STORAGE_TABLE_COLUMN_SEGMENTS DMV with necessary info (at least I haven't seen it). Not sure if this is part of a future plan. Also, I'm not sure what the advantage is for using the INFO functions as they extract the same data as the DMVs. Perhaps one benefit would be using COLUMNSTATISTICS() as it has useful info with no parsing needed.

@marcosqlbi
Copy link
Collaborator

I guess that the reason is permissions. It's likely you can invoke the INFO functions more easily (lower permissions) than DMVs going forward. But I don't know much more, Microsoft just published these functions without much additional info. We look forward to getting more news. I agree that we'll not change anything (also for compatibility reasons) for a while...

@m-kovalsky
Copy link
Author

Ah good point on permissions. That makes sense. I think just that DISCOVER DMV and something showing table row counts would be all that's needed for vertipaq analyzer to use these new functions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants