sub-domain?
Moderator: General Moderators
Re: sub-domain?
Can you explain what you want to do?
Re: sub-domain?
when we upload images it save and direct into our database, the image in our database are morethan 4thousand, each image contain 140kb to 200kb so my boss decide to get all images inside in the database since it is the cause of slow loading of the said page. he want to transfer it into another domain to save memory. meaning all images are link-able into another domain.
Ex.
our site: domain.com/image.jpg
with another: domain.com/google.com/image.jpg
Ex.
our site: domain.com/image.jpg
with another: domain.com/google.com/image.jpg
Re: sub-domain?
I still don't understand what you said: you are now storing images "direct into our database", yet you then say your boss wants you to "get all images inside in the database." Are the images in the database or not? Whatever the answer is, I would expect that moving them will increase the loading time. I can see no advantage at all to locating images somewhere else, especially a different domain. This just doesn't make any sense to me.
Re: sub-domain?
you are really genus, you exactly what i mean.
so what should we do now to increase the load of the said site.? and we cant find-out to add subdomain in our cpanel.I can see no advantage at all to locating images somewhere else, especially a different domain. This just doesn't make any sense to me.
- Grizzzzzzzzzz
- Forum Contributor
- Posts: 125
- Joined: Wed Sep 02, 2009 8:51 am
Re: sub-domain?
From my understanding you can only request & download 6 images at any one time from a domain.califdon wrote:I can see no advantage at all to locating images somewhere else, especially a different domain. This just doesn't make any sense to me.
so for example if you had 12 images on 1 domain, your browser would request 6 images at first, and the other requests would be blocked until one of those other images had been completed.
but having 6 images on 1 domain and 6 images on another will allow you to request them all at the same time & the page will load quicker. Not 100% on this kind of stuff, so if that's a load of bull then shout
Re: sub-domain?
That's inaccurate. You can configure any web server to serve as many simultaneous threads as you wish. I think the default for Apache is 5, but if you have robust server hardware, you can set it to whatever you want, but it has nothing to do with the domain, only the server (typically, many domains share the same server, but again, that all depends on the installation).
Re: sub-domain?
I may have misunderstood what you originally said. Is it possible that what your boss asked you to do was REMOVE the images from the database and store them as separate files in a SUBDIRECTORY? Many developers, including myself, recommend that images should usually NOT be stored in a database at all, instead only store the PATH to the files, which would be stored in a SUBDIRECTORY in the same domain. If I were designing a website like yours, that's probably what I would do. In any case, I think it is likely that where the image files are stored is NOT a factor in the ability of the server to deliver the images to client browsers. If your website is experiencing delays in rendering images, I recommend that you look elsewhere to find the problem, not where the images are stored.
Re: sub-domain?
Hi guys,
and now understand what i want, for my sub-domain. all are like this: i have a domain http://www.mydomain.com and i want to create a sub-domain just like:
http://www.sub-domain.mydomain.com and my question is i want to create new database for my sub-domain it is possible? and if it is possible how can i import my new database in cpanel?
and now understand what i want, for my sub-domain. all are like this: i have a domain http://www.mydomain.com and i want to create a sub-domain just like:
http://www.sub-domain.mydomain.com and my question is i want to create new database for my sub-domain it is possible? and if it is possible how can i import my new database in cpanel?
and from the quoted above if however i create sub-domain and new database it is possible that the site will increase the time load?I can see no advantage at all to locating images somewhere else, especially a different domain. This just doesn't make any sense to me.
Re: sub-domain?
You are mixing up several unrelated issues. You can use the same database for all subdomains. You may choose to use the same or a different TABLE within the database, depending on several other factors. If you need the SAME images for the new subdomains, there is no reason to change the way they are now stored. If the new subdomain will have DIFFERENT images, not used for the main domain, you might decide to store them in a different table, although I don't see any advantage in doing so. You said your database now contains 4,000 images. That's not very many, from a database perspective. Again, if I were designing such a website, I would probably not store any images directly in a database. I would store the image files in their own directory and store the PATHS to those images in the database. But their are dozens of other factors that could influence that decision, so I am not saying that that is what you should do.
You shouldn't create a new database under any circumstances I can think of. There is absolutely nothing to be gained by doing that. The same database engine would be serving both databases, anyway, so you would not gain any advantage in terms of multiple threads. I think it would probably increase the load on the server and slow it down, if anything.
You shouldn't create a new database under any circumstances I can think of. There is absolutely nothing to be gained by doing that. The same database engine would be serving both databases, anyway, so you would not gain any advantage in terms of multiple threads. I think it would probably increase the load on the server and slow it down, if anything.