Home >Backend Development >PHP Tutorial >What is the design idea of ​​user portrait database?

What is the design idea of ​​user portrait database?

WBOY
WBOYOriginal
2016-12-01 00:25:181514browse

We want to build a database for user portrait analysis. The main information content is the user's personal information, purchase order information, order transaction volume, etc.

Now I want to export this data, re-store it in the database, and do some portrait analysis. However, if the data amount of hundreds of thousands is placed in one table, the response will be too slow. However, if it is stored in multiple data tables according to the product type, , the associated query requires splicing a lot of fields.

I am just getting started, and my idea is too simple. Could you please give me some advice on database storage ideas

Reply content:

We want to build a database for user portrait analysis. The main information content is the user's personal information, purchase order information, order transaction volume, etc.

Now I want to export this data, re-store it in the database, and do some portrait analysis. However, if the data amount of hundreds of thousands is placed in one table, the response will be too slow. However, if it is stored in multiple data tables according to the product type, , the associated query requires splicing a lot of fields.

I am just getting started and my idea is too simple. Could you please give me some advice on database storage ideas

The storage field definitions and amounts should be similar. Define the index on the table, obtain the data in data segments and then analyze it. This is the current practice of most companies

Hundreds of thousands of data? The query takes less than 1ms

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn