469,603 Members | 2,285 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,603 developers. It's quick & easy.

view vs stored procedure [ when and where to use view ]

Dear All,

I have four table in database , each table contain the 5 lacs record, i have created a view on that four table using union clause.

and now i am call that view form my code like

select * form myview where name like '%Xya%'

after that i am getting the memory fault [ paging is reqired ].

so the page is not responding and my computer hang.

after that i created a stored procedure for the same and i pass the name to stored procedure.

exec sp_searchname 'xyz'

and it give the search result .

so,My question is where and when to use view insted of stored procedure.

View are faster then stored procedure or not if yes then why my page is not running in my computer using view and giving memory fault.


Regards,

Suresh
Jul 13 '07 #1
1 2494
hariharanmca
1,977 1GB
Dear All,

I have four table in database , each table contain the 5 lacs record, i have created a view on that four table using union clause.

and now i am call that view form my code like

select * form myview where name like '%Xya%'

after that i am getting the memory fault [ paging is reqired ].

so the page is not responding and my computer hang.

after that i created a stored procedure for the same and i pass the name to stored procedure.

exec sp_searchname 'xyz'

and it give the search result .

so,My question is where and when to use view insted of stored procedure.

View are faster then stored procedure or not if yes then why my page is not running in my computer using view and giving memory fault.


Regards,

Suresh

1. Store procedure will execute a set of queries and condition (like front-end methods).
2. Queries will execute with or without sub queries as a single query.
Jul 13 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

1 post views Thread by Witold Iwaniec | last post: by
5 posts views Thread by M Wells | last post: by
1 post views Thread by Matt | last post: by
2 posts views Thread by Justin | last post: by
104 posts views Thread by Beowulf | last post: by
12 posts views Thread by brwalias | last post: by
reply views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.