Skip to content

Dealing with very large datasets

phpGrid can handle VERY LARGE database tables and perform well. Make sure to disable page count with enable_pagecount(). See demo link below for more information. 

Loading from Large Database Table with 3 Million Records

In general, to improve overall performance of very large database tables, it is advisable to:

  • Use either an INT or BIGINT datatype than say a GUID
  • Partitioning may reduce the size of indexes, effectively reducing the table size
  • More memory or even SSD drive can work wonders!
  • Remove any unnecessary indexes on the table
  • Remove SELECT COUNT(*) and always include a query filter.

But, wait! I have BILLIONS of records!

First of all, congratulate on becoming another Google or Amazon! You must be doing very well! 

For very very very (yeah, 3xVery) large database tables, besides using enable_pagecount() and optimization tips aforementioned, we also recommend adding a sequence number column that tracks the actually paginated row beginning and ending number.

SELECT * FROM my_table WHERE seq > 100 And seq < 200

Some excellent posts/articles on this issue:

Using sequence:

Using InnoDB engine

Using “late row lookup”

Happy gridding!

Feedback and Knowledge Base