473,320 Members | 1,900 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,320 software developers and data experts.

if database table changes

hello all, thanks for reading.

i am trying to find a better way to keep track of changes in a ms sql
database table.

we have a ticketing system in the office, and a small app was written
to display a count of all outstanding tickets.

this is achieved by sending a "select count(rowName) from tableName"
query to the database every three seconds via the Timer control in
vb.net.

there's 7 people using this application, which means there's 7
database queries every second.

having conferred with our IT people, this load is still a manageable
one. however, once the application is widely distributed, the sql
server will definitely be stressed.

so, the question is, is there a better way to monitor the state of a
database table (getting a count of rows) that doesn't involve sending
a query on a timed increment?

any help would be greatly appreciated.

-Joe
Feb 4 '08 #1
2 1399
On 2008-02-04, Joe C. <js******@gmail.comwrote:
hello all, thanks for reading.

i am trying to find a better way to keep track of changes in a ms sql
database table.

we have a ticketing system in the office, and a small app was written
to display a count of all outstanding tickets.

this is achieved by sending a "select count(rowName) from tableName"
query to the database every three seconds via the Timer control in
vb.net.

there's 7 people using this application, which means there's 7
database queries every second.

having conferred with our IT people, this load is still a manageable
one. however, once the application is widely distributed, the sql
server will definitely be stressed.

so, the question is, is there a better way to monitor the state of a
database table (getting a count of rows) that doesn't involve sending
a query on a timed increment?

any help would be greatly appreciated.

-Joe
Well... Maybe a more distributed architecture would be called for. You
could use a webservice to actually return the count. You could have the
service do the query on a timer - that would at least centeralize the
query so that no matter how many clients, your still only doing the
query once. But, a better way - especially if this is sqlserver 2005 -
is to make use of sqlserver's query notification feature. That way the
service only has to qeury the database when an actuall change is made to
the data, eliminating the timer.

Anyway, just a thought.

--
Tom Shelton
Feb 4 '08 #2
Thanks Tom for the suggestion, I'll definitely look into the
notification feature.

Thanks!

On Feb 4, 12:56 pm, Tom Shelton
<tom_shel...@YOUKNOWTHEDRILLcomcast.netwrote:
On 2008-02-04, Joe C. <jsk.c...@gmail.comwrote:
hello all, thanks for reading.
i am trying to find a better way to keep track of changes in a ms sql
databasetable.
we have a ticketing system in the office, and a small app was written
to display a count of all outstanding tickets.
this is achieved by sending a "select count(rowName) from tableName"
query to thedatabaseevery three seconds via the Timer control in
vb.net.
there's 7 people using this application, which means there's 7
databasequeries every second.
having conferred with our IT people, this load is still a manageable
one. however, once the application is widely distributed, the sql
server will definitely be stressed.
so, the question is, is there a better way to monitor the state of a
databasetable(getting a count of rows) that doesn't involve sending
a query on a timed increment?
any help would be greatly appreciated.
-Joe

Well... Maybe a more distributed architecture would be called for. You
could use a webservice to actually return the count. You could have the
service do the query on a timer - that would at least centeralize the
query so that no matter how many clients, your still only doing the
query once. But, a better way - especiallyifthis is sqlserver 2005 -
is to make use of sqlserver's query notification feature. That way the
service only has to qeury thedatabasewhen an actuall change is made to
the data, eliminating the timer.

Anyway, just a thought.

--
Tom Shelton
Feb 5 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

16
by: noah | last post by:
Does PHP have a feature to associate Cookie sessions with a persistent database connection that will allow a single transaction across multiple HTTP requests? Here is how I imagine my process: I...
3
by: Bennett Haselton | last post by:
I'm working on an ASP.Net project where I want to test code on a local machine using a local database as a back-end, and then export it to the production machine where it uses the hosting...
4
by: Frnak McKenney | last post by:
I'm using an in-core DataSet as an image of my application's 'database' (a multi-table Access97 mdb file). Updates are made to the DataTables within the DataSet via forms with bound TextBoxes,...
3
by: Tc | last post by:
Hi, I was curious, I am thinking of writing an application that loads a dataset from a database that resides on a server. The question I have is this, if multiple copies of the app will be...
0
by: M. David Johnson | last post by:
I cannot get my OleDbDataAdapter to update my database table from my local dataset table. The Knowledge Base doesn't seem to help - see item 10 below. I have a Microsoft Access 2000 database...
3
by: josh.kuo | last post by:
Sorry about the subject, I can't think of a better one. I recently wrote some PHP classes that I think might be of interest to this group. Since I have been reaping the benefits of reading news...
16
by: Ian Davies | last post by:
Hello Needing help with a suitable solution. I have extracted records into a table under three columns 'category', 'comment' and share (the category column also holds the index no of the record...
1
by: tomjbr.32022025 | last post by:
Can anyone recommend a good framework (preferably open source) that can be used for database testing ? The thing I want to be able to do is the following: (1) Define the expected database...
12
by: nyathancha | last post by:
Hi, I have a question regarding best practices in database design. In a relational database, is it wise/necessary to sometimes create tables that are not related to other tables through a...
1
Curtis Rutland
by: Curtis Rutland | last post by:
How To Use A Database In Your Program Part II This article is intended to extend Frinny’s excellent article: How to Use a Database in Your Program. Frinny’s article defines the basic concepts...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
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)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
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

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.