Perspective Query Binding - Performance Question

I have an XY chart that has 2 series that each relate to a single Named Query. It’s actually the Paretto chart from the IA Exchange. Currently, one dataset has a query binding that grabs the data, but then there’s a transform script that does some analysis (the cumulation for the Paretto) and sets the second dataset to the results.

So both datasets are being set by a single query binding. Out of curiosity, is there any reason I can’t use the same Named Query on both datasets (and do the calculations on their own separate bindings)? I’m thinking the answer has something to do with the performance of the View or the database, but I’m curious.

Nothing is stopping you from running the query twice, though it will be doing twice the work. Whether or not you see a performance hit will depend on your query and gateway load / specs. You could also probably do your calculations in the query, though i don’t know if that would be any faster than the transform you are using.

OK, that’s what I was thinking. I just wanted to see if there was any other reason. Thanks!

Consider binding the query to a custom property, then you can bind each of the series to that custom property and use a transform to perform the calculations for each.

Then you will only need call the named query the one time.