INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Grouping Functions - refresh question  (Read 790 times)

ferday

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1732
Grouping Functions - refresh question
« on: December 29, 2020, 07:15:01 pm »

is there any way to use something like GroupSummaryQuery() with multiple criteria, i.e.:

GroupSummaryQuery((Artist, Album), Duration)  - to get the duration of each album even if there are multiple albums with the same name

i have this with Global Variables but was hoping to replace some of my older, clunkier expressions with the new terms
Logged

wer

  • Citizen of the Universe
  • *****
  • Posts: 2640
Re: Grouping Functions with multiple criteria
« Reply #1 on: December 29, 2020, 08:08:49 pm »

The wiki entry for GroupSummaryQuery seems to answer your question very explicitly.

If you think otherwise, perhaps you could restate your question so it reads like the different question you intend.
Logged

ferday

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1732
Re: Grouping Functions with multiple criteria
« Reply #2 on: December 29, 2020, 08:28:43 pm »

 :-[

ha ha ha i read that entry several times and still missed the semi-colon part

thanks
Logged

wer

  • Citizen of the Universe
  • *****
  • Posts: 2640
Re: Grouping Functions with multiple criteria
« Reply #3 on: December 29, 2020, 09:24:50 pm »

Yeah you made me doubt myself. I remember specifically adding that ; functionality to the function, and I was thinking "There's no way we didn't document it..."  Marko wrote the actual wiki page but he had me check it first, so I figured it had to be there.  But your question was so specific to it I had to go back and look just to make sure.  :)

It's new functionality we worked on with Matt this year.  Be warned, it can be slow if you use it standard view, because it will search the db for every file in the view set looking for a match.
Logged

ferday

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1732
Re: Grouping Functions with multiple criteria
« Reply #4 on: December 29, 2020, 09:42:53 pm »

it's extremely slow, but i just copy it into a static field so it's one wait time until i've finished the population bit

thanks again for pointing it out, i was sure i had seen something but just couldn't see it when i looked right at it ha ha

it's much slower than Global Variables which is interesting, it's also much easier to setup and maintain!
Logged

ferday

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1732
Re: Grouping Functions - refresh question
« Reply #5 on: January 04, 2021, 12:08:17 am »

new question re: grouping functions

they don't seem to be refreshing consistently (specifically i'm using groupsummaryquery() )

for example, i have calculated fields [totaltracks], [album DR], and [album Duration].  sometimes only one is filled out, sometimes none, sometimes all 3...but i can't find any consistency to it.  if i re-import or restart MC, the fields will change but again they don't just all fill out. 

i have gone through my test list and made sure they are analysed, and that all the criteria fields are filled out and accurate, etc.

is there something i might be possibly not seeing (likely right in front of me again...)
Logged

wer

  • Citizen of the Universe
  • *****
  • Posts: 2640
Re: Grouping Functions - refresh question
« Reply #6 on: January 04, 2021, 01:04:34 am »

You might not be doing anything wrong. Is this in standard view or theater view? It makes a difference.

I think there is plenty of room for "optimizing" (to be diplomatic) how the Query functions are implemented. There are many things that can be done with global variables that are much slower with the GroupSummary functions, and this seems questionable since the grouping functions are actually in code.  They are quite slow now. It was a totally new concept when Matt first implemented them, so perhaps the focus was just on getting them working, as there were some glitches in that regard. But I was thankful to Matt for even attempting something so avant-garde.

They also work on-demand, in that they only calculate when they have to. For example, if you load a standard view with a GroupSummaryQuery in a column, it will update only as the cells scroll into view, which makes the scrolling slow. So you might be seeing an artifact of that.

I'd be glad to take a look at your screenshot (show the actual code too) to see if I can see anything, but this might turn out to be a Matt question.
Logged

ferday

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1732
Re: Grouping Functions - refresh question
« Reply #7 on: January 04, 2021, 03:18:56 am »

thanks wer

it's standard view

i think i'm getting it under control, just trying a few things now and it looks like it may be just so slow that it's taking longer to refresh than the actual refresh rate (i believe is 60 seconds?).  will confirm after some more messing about

for reference, i'm using variations of:
Code: [Select]
=groupsummaryquery(album;album artist /(auto/),duration,1)
Logged
Pages: [1]   Go Up