I need to build a social network that is expecting very high traffic, 10k - 50k + registrations in a day, not even including visitors, pageviews, image uploads, etc..., a lot of database activity. We have a solid quad core dedicated server right now with 8GB ddr3 and 2tb hdd sata. Will doctrine be to slow as far as queries and load time to handle such a high traffic website?

  • 1
    I'm voting to close this question as off-topic because it is about the performance of a specific tool in a specific hardware environment. The answer to this question would best be determined by benchmarking and testing.
    – Thomas Owens
    Apr 30, 2015 at 12:06

2 Answers 2


Short Answer: You will certainly worsen performance, and hide database specific features that could provide more performance.

Suggestion: Use MongoDB - and a Database only where highly relational - transactional ACID compliant data is required. No ORM needed. Orm's hide the implementations of the underlying data-store. This is a great thing and an awful thing at the same time. We use MongoDB and Postgres at my corporation; This will not change for a long time. Our code is easy to read, to the point, and doesn't rely on "middleware". When new Postgres 9 features became available we could take advantage immediately. When the Python MongoDB driver was updated we could refactor very easily - no need to hack the ORM layer to accomplish this.

If you are building something like this you will need a combination of databases. A text search database, a relational database, and a fast schema-less database perhaps? How does an ORM help solve this problem? - it doesn't.


Answer is always Use normal queries instead of ORM to get better performance. If your are planning to change the database after some longer period ORM helps to done easily.You need to sacrifice performance for convenience.

I suggest you to create the separate class where you can perform DML operations by getting the inputs as parameter and create the query and use it to execute it. Instead of writing insert statement each time or for many occurrences . but Make sure too create the query which is more optimized .

  • 1
    Rajesh -- this really doesn't answer the question. Will this approach make a Doctrine 2 based app handle high traffic loads?
    – Jay Elston
    Apr 29, 2015 at 15:59
  • @JayElston: Can you explain on what basis this answer doesn't suites for the question? Andrew Fashion has to say whether its useful to him or not as he asked question .
    – Rajesh
    Apr 30, 2015 at 4:17
  • @JayElston : I have not specified the approach for Doctrine 2. The suggestion is based for not php class instead of Doctrine 2 for best performance. Can you please understand the answer first and down vote it.
    – Rajesh
    Apr 30, 2015 at 4:21

Not the answer you're looking for? Browse other questions tagged or ask your own question.