i have already Given the index on table structure.
but when i run this stored procedure in server database that it still take very long time so you have other idea to get the fast output of this stored procedure
like creating view etc...if yes then how can i fetch result of one select query in to view thats create in stored procedure.
because based on this select query result set further procedure is proceed.
Ex select query give the userIds
and using this userId i have to proceed it means its one kind of input of my stored procedure.