Improving SQL queries

Making more fast to return the tickets for a panel