0
我正在运行一个网络抓取蜘蛛,每天抓取近100万个产品。 我正考虑2点的方法: 1)本店所有商品价格的历史在一个表中Django最好的方式来存储数百万产品的价格历史?
product_id, date, price
,但这将在此表产生多万条记录。
2)将数据存储在多个表中&为每个产品制作单独的表格。
Table1: product_id, current_price
Table_product_id: date, price
Table_product_id: date, price
Table_product_id: date, price
但是我将有近一百万张桌子!
为什么你会考虑第二种选择的任何原因? –