Hi All,
I am working of database which is having large database. The database having millions of rows.
How can I handle the speed and load time issue for these records ?
Thanks in advance.
Hi All,
I am working of database which is having large database. The database having millions of rows.
How can I handle the speed and load time issue for these records ?
Thanks in advance.
You want to reduce your website load time?
Load time is a time which passed from the moment when user requested a website, until the website is fully loaded.
It’s a very broad topic, entire books have been written about it by database experts and it usually requires application and database schema specific solutions. Some points to start with:
http://database-prog…n-patterns.html
And, as duri already mentioned, object-relational mapping solutions like Yii’s Active Record don’t play well with large result sets and complex queries. You may have to write some carefully optimized SQL manually.
Thanks!!!
However how to deal with search functionality. As the database will grow large searching with different criteria taking too much time
Your first task is to optimize your queries, and make sure you defined proper type for every db column. For example, [size=2]I remember one database having milion of rows in one table. Latitude and longitude were defined as varchar type. I did some measurements before I changed to float, and beleave me some pages were faster for 5 seconds.[/size]
Also, you should think of implementing database replication. Yii 2 supports this kind of architecture which is grat. Here is article: http://www.yiiframework.com/doc-2.0/guide-db-dao.html#replication-and-read-write-splitting
Is it a keyword search or an "advanced search"-type form where users can specify complex filtering conditions?