I am creating a large database that will generate statistical reports from incoming data.
The system will work for the most part as follows:
- About 400 thousand 500 thousand rows - about 30 columns, mainly varchar (5-30) and date-time - will be loaded every morning. Its approximately 60 MB while in a flat file format, but growing sharply in the database with the addition of suitable indexes.
- Various data will be generated from the data of the current day.
- Reports from these statistics will be generated and saved.
- The current dataset will be copied to the partitioned history table.
- During the day, the current dataset (which was copied, not moved) can be requested by end users for information that is unlikely to include constants, but relationships between fields.
- Users can request specialized queries from the history table, but the queries will be created by the database administrator.
- Before loading the next day, the current data table is truncated.
This will be essentially version 2 of our existing system.
MySQL 5.0 MyISAM (Innodb ) # 6 # 4. # 4 , 5.0 . ( ), , history_queue, , . , , , , . , .
MySQL 5.1 ( MySQL) , PostgreSQL. , , , - - , . -. - MySQL, , PostgreSQL .
, . PostgreSQL " , " - , , MySQL 5.1 PostgreSQL 8.3 ?
(Oracle MS SQL) - , Oracle .
MyISAM vs. Innodb :
Innodb, , 3-4 . , MySQL, , , , db Innodb.
- , , , .. MyISAM .
5.1:
, 5.1. , ( 12 ) . , 5.1, , , .
PostgreSQL gotchas:
COUNT (*) - - . , .
COPY FROM , LOAD DATA INFILE, .
- INSERT IGNORE. , , GROUP BY , . , , .