Register and join over 40,000 other developers!
Recent Topics
-
The Game You Are Waiting For?
WendellHarper - Dec 06 2020 01:21 PM
-
Quora and Reddit Backlinks
WendellHarper - Dec 06 2020 01:14 PM
-
Delete account
pindo - Jul 23 2020 01:33 AM
-
Print specific values from dictionary with a specific key name
Siten0308 - Jun 20 2019 01:43 PM
-
Learn algorithms and programming concepts
johnnylo - Apr 23 2019 07:49 AM
Recent Blog Entries
Recent Status Updates
Popular Tags
- networking
- Managed C++
- stream
- console
- database
- authentication
- Visual Basic 4 / 5 / 6
- session
- Connection
- asp.net
- import
- syntax
- hardware
- html5
- array
- mysql
- java
- php
- c++
- string
- C#
- html
- loop
- timer
- jquery
- ajax
- javascript
- programming
- android
- css
- assembly
- c
- form
- vb.net
- xml
- linked list
- login
- encryption
- pseudocode
- calculator
- sql
- python
- setup
- help
- game
- combobox
- binary
- hello world
- grid
- innerHTML

Database optimisation for Social Networking sites.
Started by chax, Sep 06 2012 10:21 AM
database optimisation
6 replies to this topic
#1
Posted 06 September 2012 - 10:21 AM
I have been assigned the project of creating a social networking site. I have been working on the schema and created one. But the problem is how to optimise it. As the users, posts, polls, friends, foes etc keep increasing day by day the Database as I think will slow down. How do I tackle it?
Size does matter for science and its laws changes accordingly.
#2
Posted 06 September 2012 - 11:49 AM
You will need to give us more information on what you are working on, how much traffic, users, etc are your target, which hardware are you working on and which database engine.
in such massive services there is a lot of things to check, one being the operating system helping the database, meaning no interferences, intensive cpu taker processes and NO swapping ! meaning avoid your server's software to use more memory than the installed physical RAM ever.
Second check your database engine is properly configured in core-wise and memory-wise terms too, it usually gives you the chance to configure the resources usage limits.
Then make sure your database is well configure in table growth parameters, same for logs and indexes.
one trick to make DB faster is to have many hard disks, and assign data to one disk, indexes and logs to another one.
after that you can check on your tables having proper indexes in regards of most common used queries, and think the database not that much in normal forms ways but in performance one, sometimes the academically approved approaches are the slowest ones.
Then make sure you find a good cache, like mem cache, web cache, some of those and make your site work with them, and the last that comes to mi mind now is to be wise about what is "to be stored" data and what is just temporary counters, you can always use memory tables and shared memory for counters and similar
oh, and the most important thing of all! give it a like to this answer someone took the time to give to you
you come back later and make us now a little bit more about that project.
in such massive services there is a lot of things to check, one being the operating system helping the database, meaning no interferences, intensive cpu taker processes and NO swapping ! meaning avoid your server's software to use more memory than the installed physical RAM ever.
Second check your database engine is properly configured in core-wise and memory-wise terms too, it usually gives you the chance to configure the resources usage limits.
Then make sure your database is well configure in table growth parameters, same for logs and indexes.
one trick to make DB faster is to have many hard disks, and assign data to one disk, indexes and logs to another one.
after that you can check on your tables having proper indexes in regards of most common used queries, and think the database not that much in normal forms ways but in performance one, sometimes the academically approved approaches are the slowest ones.
Then make sure you find a good cache, like mem cache, web cache, some of those and make your site work with them, and the last that comes to mi mind now is to be wise about what is "to be stored" data and what is just temporary counters, you can always use memory tables and shared memory for counters and similar

oh, and the most important thing of all! give it a like to this answer someone took the time to give to you

you come back later and make us now a little bit more about that project.
#3
Posted 06 September 2012 - 01:13 PM
You're going to look at the queries you use, and create indexes as a first point. If you find that you have not fully normalized your database, that may be another place you can optimize. Realize, as well, that the queries you're running may need to be optimized, too.
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog
My MineCraft server site: http://banishedwings.enjin.com/
#4
Posted 06 September 2012 - 08:45 PM
The project is completely new of its kind (the intent and the requirements to some extent) and hence I have no Idea what kind of traffic I'll have to deal with. There is something more I have done to the database. I have fragmented it on the basis of time-tags as of now and working on the virality, popularity and the oldness factors.
Size does matter for science and its laws changes accordingly.
#5
Posted 07 September 2012 - 02:15 AM
you are going to good work but please you explain me exactly what is your question???what you want to ask us ???? if you have any problem with datatbase then you can installed sql server 2010
#6
Posted 07 September 2012 - 03:15 AM
I don't know how to undo that rating. My wobbling mouse
. But sincerely thank you for your concern. I didn't know of phpBB and phpNuke and that they are open sourced. I hope I'll be able to get around creating the social networking site using them.

Size does matter for science and its laws changes accordingly.
#7
Posted 07 September 2012 - 11:12 AM
The key thing you'll probably want to do once you go live and start getting some traffic is look at some logs of DB usage, what queries are being run, and where the slowdowns occur. Optimizing a table that is only hit by 0.1% of your queries doesn't help much, for example.
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog
My MineCraft server site: http://banishedwings.enjin.com/
Also tagged with one or more of these keywords: database, optimisation
Language Forums →
Databases →
SOLVED: Conditional insertion of rows via MySQLStarted by PuddingEatsPanda, 19 Mar 2016 ![]() |
|
![]() |
||
General Forums →
General Programming →
sql database 2008Started by rhysgardner, 31 Jan 2016 ![]() |
|
![]() |
||
General Forums →
General Computing →
What are some free database servers for testing cross platform application?Started by BlueBox, 03 Jan 2016 ![]() |
|
![]() |
||
Language Forums →
Other Languages →
ASP, ASP.NET and Coldfusion →
Problem at insert and delete, and a database call questionStarted by FrancoPapalardo, 13 Dec 2015 ![]() |
|
![]() |
||
General Forums →
Mobile Development →
How to add a database inside an Android applicationStarted by jasonalien, 18 Aug 2015 ![]() |
|
![]() |
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download