Morning All,
I'm building a report which requires a count of first time buyers by Production Season. Pulling counts from T_ORDER_SEAT_HIST and filtering out anyone with orders for previous Production Seasons should give me what I want, but the code takes forever to run.
I've trawled the forums but not found any decent solution, without using T-Stats, which is not an option in the case.
Does anyone have an answer?
Thanks, Debbie
Debbie,
I want to start by saying that I avoid using T_ORDER_SEAT_HIST whenever possible. Pulling the data straight from T_SUB_LINEITEM using the sli_status is usually preferable as the seat history table will have line entries for every single action taken against a sub lineitem and there are some known issues that can arise from that. Just my two cents there. Is there a particular reason that you need to use the seat history table here?
Without seeing the code, I cannot be sure what is causing it to take time to run, but I will say that if you have to filter through and add/subtract every line from the seat history table to find the counts, that could potentially be causing some time lag for you, particularly if you are doing so for a large production run with many sold tickets against a large number of constituents, but that would probably impact its speed only so much; there may be other things causing delays as well.
John
Hi John,
Thanks for getting back to me. I'm now using T_TICKET_HISTORY instead and the code is working very quickly and returning the correct numbers.
Debbie
Lovely to hear it! Of course with the ticket history table, there is also the one more added thing that the ticket history is not updated in real time and you are at the mercy of however often you have your ticket history procedures set to run/update (usually nightly).
That said, for most business circumstances, that should still work just fine. Glad I was able to assist.