handling heavy tables in mysql/php

Coding Critique is the place to post source code for peer review by other members of DevNetwork. Any kind of code can be posted. Code posted does not have to be limited to PHP. All members are invited to contribute constructive criticism with the goal of improving the code. Posted code should include some background information about it and what areas you specifically would like help with.

Popular code excerpts may be moved to "Code Snippets" by the moderators.

Moderator: General Moderators

Post Reply
ashok.pintu
Forum Newbie
Posts: 1
Joined: Fri Aug 01, 2008 4:13 am

handling heavy tables in mysql/php

Post by ashok.pintu »

I have a table (mysql) with 66,00,000 records.
now does anyone help me how to handle this table in php/mysql.
my requirement is to search a record based on certain criteria.
User avatar
jaoudestudios
DevNet Resident
Posts: 1483
Joined: Wed Jun 18, 2008 8:32 am
Location: Surrey

Re: handling heavy tables in mysql/php

Post by jaoudestudios »

I would index your searchable columns to improve search performance
josh
DevNet Master
Posts: 4872
Joined: Wed Feb 11, 2004 3:23 pm
Location: Palm beach, Florida

Re: handling heavy tables in mysql/php

Post by josh »

You're going to need table partitioning, you can set up table partitioning in mysql so mysql can divide the data into more discrete groups, for instance records 1-10M are in partionA on the disk, records 10-20M in partionB, etc...

You can set up partitioning in different ways based on the data you are trying to display. With a table of that size you may need some logic on your application based on what you are trying to do, such as caching or job queues. Can you give us more info on what kind of data youre working with and how youre using / manipulating it?

http://dev.mysql.com/doc/refman/5.1/en/ ... types.html
Post Reply