Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 constant insert and select on a single table

Author  Topic 

FarzinSh
Starting Member

7 Posts

Posted - 2013-08-17 : 02:01:46
We have a table for recording video frames coming straight from the sum of 8 security cameras with the speed rate of 10 fps. Each received frame is saved as a new record in an sql table using c# and entity framework after some image processing functions called on them. There is also a video player that selects some frames from the same table simultaneously and displays them based on the user's selected time range. The problem is that once in a while sql do not respond and we would face timeouts and from there no other commands could be run on sql and the recording fails. We are getting close to our next deadline on the project and this has to be fixed. We would appreciate any kind of help

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-08-17 : 09:22:50
whats the configuration of server used? is it tand alone or clustered?

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2013-08-17 : 10:48:46
How are your growth settings? Especially the log file will take a severe hit on blobs.



Microsoft SQL Server MVP, MCT, MCSE, MCSA, MCP, MCITP, MCTS, MCDBA
Go to Top of Page

FarzinSh
Starting Member

7 Posts

Posted - 2013-08-18 : 01:51:02
since the log file was not important to our clients we dont keep it for our db.
Go to Top of Page

FarzinSh
Starting Member

7 Posts

Posted - 2013-08-18 : 01:56:59
Our server is standalone...
Go to Top of Page

FarzinSh
Starting Member

7 Posts

Posted - 2013-08-18 : 04:18:44
Here is an update to the problem...
In order to reduce the possibility of encountering the mentioned timeouts, I've changed the procedure of saving frames and instead of using multithreading for inserting multiple frames at once, each received frame is now added to a C# QUEUE so that only one sql insert command requests to be executed on sql at a time.On the other hand,and since the user is able to watch 16 videos together using our video player, we still run multiple selects on the same data from the same recording table. The problem is that those select commands are responding rather slow which affects the performance of the player. Therefore I need to optimize the speed rate....Any Ideas?
Thanks for the helps in advance.
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2013-08-18 : 09:28:03
Yes, don't use a database for this. Store the individual images in the operating system disks.
Why add the overhead of a database when you cannot use T-SQL to do anything with the images?



Microsoft SQL Server MVP, MCT, MCSE, MCSA, MCP, MCITP, MCTS, MCDBA
Go to Top of Page

FarzinSh
Starting Member

7 Posts

Posted - 2013-08-19 : 03:25:35
quote:
Originally posted by SwePeso

Yes, don't use a database for this. Store the individual images in the operating system disks.
Why add the overhead of a database when you cannot use T-SQL to do anything with the images?



Microsoft SQL Server MVP, MCT, MCSE, MCSA, MCP, MCITP, MCTS, MCDBA




One of the reasons is that aside from the image content as u said,we have bunch of other stuff extracted from each frame and stored in couple of other tables in relation to this very table such as the moving objects info in case motion happens in a single frame and so on and though i think the better way would be to save the images in a file and then store the related indices for each frame in the table
so that they could be accessed and played in the player, since its a lot of work for the time being until our deadline I am trying to find an easier solution.
Go to Top of Page
   

- Advertisement -