query related to function
hello
I have created a function but it takes good amount of time
CREATE FUNCTION dbo.fnMusic()
RETURNS TABLE
AS
RETURN
(SELECT dbo.tbl_A.Primary_Key ,tbl_A.Title, tbl_B.price
FROM dbo.tbl_A
LEFT OUTER JOIN dbo.tbl_B ON dbo.tbl_A.Primary_Key = dbo.tbl_B.primary_key)
there are 30,000 records in tbl_A
and 20 lacs records in tbl_B
Please tell me the solution for this i have already created the indexing on all the above mentioned fields.
thanks in advance
|