SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 constant insert and select on a single table
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

FarzinSh
Starting Member

Iran
7 Posts

Posted - 08/17/2013 :  02:01:46  Show Profile  Reply with Quote
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

India
52309 Posts

Posted - 08/17/2013 :  09:22:50  Show Profile  Reply with Quote
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

Sweden
30102 Posts

Posted - 08/17/2013 :  10:48:46  Show Profile  Visit SwePeso's Homepage  Reply with Quote
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

Iran
7 Posts

Posted - 08/18/2013 :  01:51:02  Show Profile  Reply with Quote
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

Iran
7 Posts

Posted - 08/18/2013 :  01:56:59  Show Profile  Reply with Quote
Our server is standalone...
Go to Top of Page

FarzinSh
Starting Member

Iran
7 Posts

Posted - 08/18/2013 :  04:18:44  Show Profile  Reply with Quote
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

Sweden
30102 Posts

Posted - 08/18/2013 :  09:28:03  Show Profile  Visit SwePeso's Homepage  Reply with Quote
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

Iran
7 Posts

Posted - 08/19/2013 :  03:25:35  Show Profile  Reply with Quote
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
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000