Forum Discussion
Agg Table Efficiency Min Date
- 4 years ago
In my specific case...the view is the fastest method to refreshing data and getting the groupings necessary. Unfortunately the underlying data has several columns that need grouping and Power Query wasn't providing the needed efficiency. I've improved the sql code for the view and can run sql directly in the model for 2 fact tables ~20mil rows with about 25 columns in 52mins. Hoping this will improve even more once the view is in place and I can push changes to Oracle. Thanks lbendlin for trying to assist!!
Not sure what Query folding has to do with all of this. Can you create a view in Oracle that provides the aggregations?
- codyraptor4 years agoResolver I
lbendlin I can't unfortunately. I don't have access to the source. That would definitely be the easiest thing. I'm trying to keep PBI from reading every row. Like I said...count is super fast. It's only when I try to fix the min date issue that I lose efficiency in my agg table. I can use native sql...but that seems to be very inefficient from an oracle db
- lbendlin4 years agoSuper User
"I can use native sql...but that seems to be very inefficient from an oracle db"
please elaborate.
- codyraptor4 years agoResolver I
Oracle doesn't allow query folding at this time...so I can't get the benefit of query folding using Power Query to make adjustments after sql. When I aggregate data using the sql statement...it takes almost an hour to run around 8m rows. My sql is doing a count distinct. That's literally the only aggregation in this table. My 'group by' is 7 Keys from the relational db..all intergers. I have 3 sub queries where I have to group things a certain way because the source table is at a more granular level. Sub queries are pretty basic but I'm open to ideas if that's causing my issue.