How to handle Image/Data from Centralized SQL Server
-
Dear All, Request your help/Suggestion. I have created a windows application which will get data from centaralized SQL server having image datatype as well. And am using simple ado.net to connect to the SQL server and the connection will be made via internet. Now my problem is when i try to connect the SQL Server via internet am getting perfomance issue that it is taking much time to connect and get the data back from the SQL server. Now I need help from you experts that, 1) How to handle this data transfer from Centralized SQL Server to my Windows application effectively. 2) Will webservice work for me? if i convert the SQL Server connections through web services then the data transfers will be good? and also the image will come fast? Or please suggest me what is the effective way to get data from Centralized SQL server via internet. Thanks in advance Hema Bairavan
-
Dear All, Request your help/Suggestion. I have created a windows application which will get data from centaralized SQL server having image datatype as well. And am using simple ado.net to connect to the SQL server and the connection will be made via internet. Now my problem is when i try to connect the SQL Server via internet am getting perfomance issue that it is taking much time to connect and get the data back from the SQL server. Now I need help from you experts that, 1) How to handle this data transfer from Centralized SQL Server to my Windows application effectively. 2) Will webservice work for me? if i convert the SQL Server connections through web services then the data transfers will be good? and also the image will come fast? Or please suggest me what is the effective way to get data from Centralized SQL server via internet. Thanks in advance Hema Bairavan
Hema Bairavan wrote:
Now my problem is when i try to connect the SQL Server via internet
Your second problem is security; check out if there are a lot of foreigners trying to log in, that might kill performance a bit. It'd be better to have the Sql server expose it's data over a webservice.
Hema Bairavan wrote:
am getting perfomance issue that it is taking much time to connect and get the data back from the SQL server.
Again, are you sure? Isn't it just a query that's taking a lot of time? Did you ask for the "statistics" in Sql management Studio?
Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^] They hate us for our freedom![^]
-
Dear All, Request your help/Suggestion. I have created a windows application which will get data from centaralized SQL server having image datatype as well. And am using simple ado.net to connect to the SQL server and the connection will be made via internet. Now my problem is when i try to connect the SQL Server via internet am getting perfomance issue that it is taking much time to connect and get the data back from the SQL server. Now I need help from you experts that, 1) How to handle this data transfer from Centralized SQL Server to my Windows application effectively. 2) Will webservice work for me? if i convert the SQL Server connections through web services then the data transfers will be good? and also the image will come fast? Or please suggest me what is the effective way to get data from Centralized SQL server via internet. Thanks in advance Hema Bairavan
The first thing you might look at is the size of the images. Depending on it's usage you might want to save a copy with less quality (tuned for webapplications eg). If quality is needed I would look into saving the images on disc and providing the link and/or caching. From a speed point of view, the webservice will probably slow you down, but you might find it easier managable to go through a web service. As long as the application is running on the inside, you can get away with the security, but if someone external wants to use it you better use a webservice. If all that doesn't help to improve performance you need to have a look at the database and/or the application. Is the database tuned and indexed correctly (does it need to be re-indexed?). Is your application not doing things unnecessary like fetching/loading the image multiple times during copies from memory objects eg. hope this helps.
-
Hema Bairavan wrote:
Now my problem is when i try to connect the SQL Server via internet
Your second problem is security; check out if there are a lot of foreigners trying to log in, that might kill performance a bit. It'd be better to have the Sql server expose it's data over a webservice.
Hema Bairavan wrote:
am getting perfomance issue that it is taking much time to connect and get the data back from the SQL server.
Again, are you sure? Isn't it just a query that's taking a lot of time? Did you ask for the "statistics" in Sql management Studio?
Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^] They hate us for our freedom![^]
Dear Eddy, First of all thanks for your time to replying to me.. Regarding to the security i am using the encrypted password for the sql server, and only my application from various places going to access the DB with same user id and password so i hope security wont be an issue. And Its just a query only i hope, because when i put a select statement ignoring the image column am getting records bit faster (even though its late only when compared to query executed in normal LAN server) but when i query with image data type am even getting more. So getting into webservices will solve my problem? but how about images through web services?
-
Dear Eddy, First of all thanks for your time to replying to me.. Regarding to the security i am using the encrypted password for the sql server, and only my application from various places going to access the DB with same user id and password so i hope security wont be an issue. And Its just a query only i hope, because when i put a select statement ignoring the image column am getting records bit faster (even though its late only when compared to query executed in normal LAN server) but when i query with image data type am even getting more. So getting into webservices will solve my problem? but how about images through web services?
Ultimately, an image is just an array of bytes. There's a huge hint.
*pre-emptive celebratory nipple tassle jiggle* - Sean Ewington
"Mind bleach! Send me mind bleach!" - Nagy Vilmos
CodeStash - Online Snippet Management | My blog | MoXAML PowerToys | Mole 2010 - debugging made easier
-
The first thing you might look at is the size of the images. Depending on it's usage you might want to save a copy with less quality (tuned for webapplications eg). If quality is needed I would look into saving the images on disc and providing the link and/or caching. From a speed point of view, the webservice will probably slow you down, but you might find it easier managable to go through a web service. As long as the application is running on the inside, you can get away with the security, but if someone external wants to use it you better use a webservice. If all that doesn't help to improve performance you need to have a look at the database and/or the application. Is the database tuned and indexed correctly (does it need to be re-indexed?). Is your application not doing things unnecessary like fetching/loading the image multiple times during copies from memory objects eg. hope this helps.
Dear V, First of all thanks for your time to replying to me. I have restricted the application to store the image size only less than 50kb, and even there also am getting problem. And i hope i could go for the option you said saving in the disk but once again as an windows application accessing image from a shared drive??? and regarding the security none other than me or my application is going to log in to the application none other foreigners. And i have only 5 records in my table.. Is there indexing will apply in this case? am getting the time delay on just putting a select statement of 5 records...
-
Dear Eddy, First of all thanks for your time to replying to me.. Regarding to the security i am using the encrypted password for the sql server, and only my application from various places going to access the DB with same user id and password so i hope security wont be an issue. And Its just a query only i hope, because when i put a select statement ignoring the image column am getting records bit faster (even though its late only when compared to query executed in normal LAN server) but when i query with image data type am even getting more. So getting into webservices will solve my problem? but how about images through web services?
Hema Bairavan wrote:
Regarding to the security i am using the encrypted password for the sql server, and only my application from various places going to access the DB with same user id and password so i hope security wont be an issue.
So.. I could simply try "sa" and password-combinations over the internet? Can I has the IP? :-D
Hema Bairavan wrote:
And Its just a query only i hope, because when i put a select statement ignoring the image column am getting records bit faster (even though its late only when compared to query executed in normal LAN server) but when i query with image data type am even getting more.
"A bit faster" isn't very encouraging; it means that the image's size probably isn't the bottleneck. Your LAN is a few MB wide, at least - one usually does not have that bandwidth on the internet.
Hema Bairavan wrote:
So getting into webservices will solve my problem? but how about images through web services?
Webservices would not make it go faster, on the contrary, it's an extra layer. OTOH, it'd be a bit safer. You're describing a desktop-application. How long does it take to download a megabyte, using your code? I assume you download the images only once, and cache them locally? Otherwise, consider hosting them on a webserver (not a database) and use the
WebBrowser
control to display them; that way IE will determine whether or not it needs to download a new version, or use the cached one in a temp-folder.Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^] They hate us for our freedom![^]
-
Dear V, First of all thanks for your time to replying to me. I have restricted the application to store the image size only less than 50kb, and even there also am getting problem. And i hope i could go for the option you said saving in the disk but once again as an windows application accessing image from a shared drive??? and regarding the security none other than me or my application is going to log in to the application none other foreigners. And i have only 5 records in my table.. Is there indexing will apply in this case? am getting the time delay on just putting a select statement of 5 records...
Hema Bairavan wrote:
size only less than 50kb
That´s not much, so no problem there
Hema Bairavan wrote:
but once again as an windows application accessing image from a shared drive???
Why should this be a problem?
Hema Bairavan wrote:
Is there indexing will apply in this case?
No , five records doens´t need indexing. In this case you have to culprits left, your code or the network, debug your application and check what method or statement takes a long time.
-
Dear All, Request your help/Suggestion. I have created a windows application which will get data from centaralized SQL server having image datatype as well. And am using simple ado.net to connect to the SQL server and the connection will be made via internet. Now my problem is when i try to connect the SQL Server via internet am getting perfomance issue that it is taking much time to connect and get the data back from the SQL server. Now I need help from you experts that, 1) How to handle this data transfer from Centralized SQL Server to my Windows application effectively. 2) Will webservice work for me? if i convert the SQL Server connections through web services then the data transfers will be good? and also the image will come fast? Or please suggest me what is the effective way to get data from Centralized SQL server via internet. Thanks in advance Hema Bairavan
You must localize the problem. However per your other comment it is probably a network problem. Your other comment suggest that a query without the image data is a "bit" faster. A query without the image data would be smaller than one with it. And a network problem would have more problems with more data. Thus that fits. A database problem with the size that you suggested in another comment seems very unlikely unless you did something very odd with the database. And I can't image how you could have messed up the client side that would cause a slow down. There are various ways to test network performance which you can google for.
-
Dear All, Request your help/Suggestion. I have created a windows application which will get data from centaralized SQL server having image datatype as well. And am using simple ado.net to connect to the SQL server and the connection will be made via internet. Now my problem is when i try to connect the SQL Server via internet am getting perfomance issue that it is taking much time to connect and get the data back from the SQL server. Now I need help from you experts that, 1) How to handle this data transfer from Centralized SQL Server to my Windows application effectively. 2) Will webservice work for me? if i convert the SQL Server connections through web services then the data transfers will be good? and also the image will come fast? Or please suggest me what is the effective way to get data from Centralized SQL server via internet. Thanks in advance Hema Bairavan
Ok Guys, Thanks for all your help and suggestions and your time for replying. With your suggestions and replies now am planning to change my application to take the image from shared disk using web browser control in my application and database connection would be using web services. So is this ok? Thanks again for all your help.