I'm building a vb.net Forms project that is getting data from a SQL Server
database.
One of the main goals of the project is to be really responsive to events,
such as textbox change events. I have a textbox for searching, a listbox to
display the searched results, and a big textbox (memo) to display the
clicked-results of the listbox item.
My question is: should I load the controls with objects, and therefore store
everything in memory for fast performance, or is SQL Server fast enough to
capture textbox_change events and return recordsets? Or am I asking too much
of SQL Server? Locally, there will be a dedicated MSDE database, so the load
is manageable. The main database is a shared SQL Server db which is
synchronized as needed.
I have had great results loading controls with objects...the performance is
incredible. However, I think that in the future, as the dataset grows, I
might be storing a couple of megs in RAM, so there might be a penalty in the
future. If I use recordsets, I immediately get a performance penalty, but I
have unlimited future growth.
I appreciate any feedback from anyone on this...what your preferences are
and why. thanks 4 1370
mrmagoo wrote: I'm building a vb.net Forms project that is getting data from a SQL Server database.
One of the main goals of the project is to be really responsive to events, such as textbox change events. I have a textbox for searching, a listbox to display the searched results, and a big textbox (memo) to display the clicked-results of the listbox item.
My question is: should I load the controls with objects, and therefore store everything in memory for fast performance, or is SQL Server fast enough to capture textbox_change events and return recordsets? Or am I asking too much of SQL Server? Locally, there will be a dedicated MSDE database, so the load is manageable. The main database is a shared SQL Server db which is synchronized as needed.
I have had great results loading controls with objects...the performance is incredible. However, I think that in the future, as the dataset grows, I might be storing a couple of megs in RAM, so there might be a penalty in the future. If I use recordsets, I immediately get a performance penalty, but I have unlimited future growth.
I appreciate any feedback from anyone on this...what your preferences are and why. thanks
You are not thinking about it correctly. if you are loading controls
from objects or directly from SQL the data still has to come from SQL at
some point. Now if you are talking about bringing all the data down and
storing it locally, that will always be fastest.
Chris
It's correct.
Depending on the design, there are 2 general possibilities. (or more if you
can think of a better way).
If this is an object based approach, launching the application returns a
recordset and loads all of that into memory. From that point on, the events
load controls from memory.
If this is all recordsets, launching the application does nothing. Typing in
the controls returns small recordsets of matched results for each keystroke.
Does that make sense? At some intervals there will always be recordsets. For
the memory based approach, it occurs on app launch and other intervals as
needed. Perhaps there will be a "refresh" command button that will re-load
all of the objects from the same event that loaded the recordset on app
launch.
For the recordset approach recordsets occur a lot more frequently.
"Chris" <no@spam.com> wrote in message
news:un**************@TK2MSFTNGP02.phx.gbl... mrmagoo wrote: I'm building a vb.net Forms project that is getting data from a SQL
Server database.
One of the main goals of the project is to be really responsive to
events, such as textbox change events. I have a textbox for searching, a listbox
to display the searched results, and a big textbox (memo) to display the clicked-results of the listbox item.
My question is: should I load the controls with objects, and therefore
store everything in memory for fast performance, or is SQL Server fast enough
to capture textbox_change events and return recordsets? Or am I asking too
much of SQL Server? Locally, there will be a dedicated MSDE database, so the
load is manageable. The main database is a shared SQL Server db which is synchronized as needed.
I have had great results loading controls with objects...the performance
is incredible. However, I think that in the future, as the dataset grows, I might be storing a couple of megs in RAM, so there might be a penalty in
the future. If I use recordsets, I immediately get a performance penalty,
but I have unlimited future growth.
I appreciate any feedback from anyone on this...what your preferences
are and why. thanks
You are not thinking about it correctly. if you are loading controls from objects or directly from SQL the data still has to come from SQL at some point. Now if you are talking about bringing all the data down and storing it locally, that will always be fastest.
Chris
mrmagoo wrote: It's correct.
Depending on the design, there are 2 general possibilities. (or more if you can think of a better way).
If this is an object based approach, launching the application returns a recordset and loads all of that into memory. From that point on, the events load controls from memory.
If this is all recordsets, launching the application does nothing. Typing in the controls returns small recordsets of matched results for each keystroke.
Does that make sense? At some intervals there will always be recordsets. For the memory based approach, it occurs on app launch and other intervals as needed. Perhaps there will be a "refresh" command button that will re-load all of the objects from the same event that loaded the recordset on app launch.
For the recordset approach recordsets occur a lot more frequently.
"Chris" <no@spam.com> wrote in message news:un**************@TK2MSFTNGP02.phx.gbl...
mrmagoo wrote:
I'm building a vb.net Forms project that is getting data from a SQL Server database.
One of the main goals of the project is to be really responsive to events, such as textbox change events. I have a textbox for searching, a listbox to display the searched results, and a big textbox (memo) to display the clicked-results of the listbox item.
My question is: should I load the controls with objects, and therefore store everything in memory for fast performance, or is SQL Server fast enough to capture textbox_change events and return recordsets? Or am I asking too much of SQL Server? Locally, there will be a dedicated MSDE database, so the load is manageable. The main database is a shared SQL Server db which is synchronized as needed.
I have had great results loading controls with objects...the performance is incredible. However, I think that in the future, as the dataset grows, I might be storing a couple of megs in RAM, so there might be a penalty in the future. If I use recordsets, I immediately get a performance penalty, but I have unlimited future growth.
I appreciate any feedback from anyone on this...what your preferences are and why. thanks
You are not thinking about it correctly. if you are loading controls from objects or directly from SQL the data still has to come from SQL at some point. Now if you are talking about bringing all the data down and storing it locally, that will always be fastest.
Chris
It all depends on the size of your dataset and what the client computer
specs would be. No general way is correct.
Chris
Mr Magoo,
It depends all from the style from your query box and the ammount of data.
Probably a recordset will not help you much to get speed, because the
datatable is much faster to retrieve and to access. Your program will as
well be needless large because the extra memory you will have to use to hold
the ADODB DLL.
I would just start with creating a query for SQL and return the answer with
an executeScalar.
Just my thought,
Cor
"mrmagoo" <-> schreef in bericht
news:uL**************@TK2MSFTNGP05.phx.gbl... I'm building a vb.net Forms project that is getting data from a SQL Server database.
One of the main goals of the project is to be really responsive to events, such as textbox change events. I have a textbox for searching, a listbox to display the searched results, and a big textbox (memo) to display the clicked-results of the listbox item.
My question is: should I load the controls with objects, and therefore store everything in memory for fast performance, or is SQL Server fast enough to capture textbox_change events and return recordsets? Or am I asking too much of SQL Server? Locally, there will be a dedicated MSDE database, so the load is manageable. The main database is a shared SQL Server db which is synchronized as needed.
I have had great results loading controls with objects...the performance is incredible. However, I think that in the future, as the dataset grows, I might be storing a couple of megs in RAM, so there might be a penalty in the future. If I use recordsets, I immediately get a performance penalty, but I have unlimited future growth.
I appreciate any feedback from anyone on this...what your preferences are and why. thanks This discussion thread is closed Replies have been disabled for this discussion. Similar topics
1 post
views
Thread by Darter Dan |
last post: by
|
5 posts
views
Thread by John Richardson |
last post: by
|
13 posts
views
Thread by Simon Harvey |
last post: by
|
7 posts
views
Thread by Tim |
last post: by
|
1 post
views
Thread by kanones |
last post: by
|
reply
views
Thread by Phl |
last post: by
|
1 post
views
Thread by Bob Rock |
last post: by
|
8 posts
views
Thread by |
last post: by
|
2 posts
views
Thread by adiel_g |
last post: by
| | | | | | | | | | |