473,323 Members | 1,547 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,323 software developers and data experts.

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 2632
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

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

Similar topics

1
by: Witold Iwaniec | last post by:
Hi I have a procedure that calls a view. The view is built with some outer joins but it performs fine. If I run in Query Analyzer select count(*) from long_name_view where name_id = 'AAA'
4
by: MD | last post by:
I am trying to create a dynamic SQL statement to create a view. I have a stored procedure, which based on the parameters passed calls different stored procedures. Each of this sub stored procedure...
10
by: serge | last post by:
Using "SELECT * " is a bad practice even when using a VIEW instead of a table? I have some stored procedures that are identical with the difference of one statement in the WHERE clause. If I...
4
by: Lauren Quantrell | last post by:
In my old MDB databases, I constructed a lot of "subQueries" to filter out records, then based a new query on the subQuery. This results in huge speed increases on large datasets. However... In...
5
by: M Wells | last post by:
Hi All, Is it possible to use form criteria in a query / view in an Access 2003 ADP with SQL Server as the backend? ie something like: select * from mytable where recid = forms!! I'm...
1
by: Matt | last post by:
Hi, I'm trying to fill an ASP.NET DataGrid from a SQL-Server View. Note that this is a View and not a Stored Procedure. If i write the SQL instructions directly in the code, or if i use a...
2
by: Justin | last post by:
I am creating a web app for a client in VS.NET using ASP.NET with C#. I need to query three tables in a database using one parameter and display the results on the page. my question is should I use...
104
by: Beowulf | last post by:
I have the view below and if I use vwRouteReference as the rowsource for a combo box in an MS Access form or run "SELECT * FROM vwRouteReference" in SQL Query Analyzer, the rows don't come through...
12
by: brwalias | last post by:
Hi, using .net 2 sql server 2005 Here is my situation: I'm passing a variable in the url from a selection on Page A and need to display the results on the Results page be based on that...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.