Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

slow calculation speed

Hi all,

hope you can help. I'm having some troubles at work in trying to simplify the following expression out:

sum(aggr(distinct sum(vote), [Session ID], question, company))/

sum(aggr(count({<vote=-{' '}>} distinct [Session ID]), question, company))

The expression works - slowly - if I filter on a single question or a single company. When removing the filters, QV just crashes.

Any help?

Basically what I have here is the result of a survey where for each user (Session ID) I have asked a series of questions for 20 companies (same questions for the 20 companies) where the user can give a vote (from 1 to 5). I want to calculate a weighted average both when I look at it from a company point of view, and from a question point of view.

Any help appreciated. Thanks

4 Replies
Not applicable
Author

How many records are we talking about?

How many RAM has your machine?

By any chance can you calculate some of this expressions in the load script?

Not applicable
Author

Hi Federico,

not that many records: about 90000. The machine I'm running on has 3GB of RAM and an i5 pentium processor.

No luck on the loading script since both numerator and denominator must vary based on the selections on the company and on the question fields.

Thanks, ciao

Not applicable
Author

Very few records...

In my experience when it takes a lot to load or crushes is when the model is not correct and instead of a "join" makes a "cartesian product". Generally case sensitive problems in the relationships

Not applicable
Author

But there is really nothing complex on the loading script. I did a crosstable on two excel spreadsheets. Therefore I have the following fields: Session ID, mail of user, submit time, question and the vote field.

The only trick is that the question field has the name of the company in front, so with a subfield function I have extracted the name of the company on one side and the question on the other making these two fields resident on the main load.

The whole loading doesen't require more than 2 sec.

Possibly something wrong in the crosstable function???