MySQL索引20亿行 [英] MySQL Indexing 2 billion rows

查看:144
本文介绍了MySQL索引20亿行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

首先,这是MySQL 5.6和MyISAM表,在具有4.2GHZ I7 16GB RAM和RAID 0驱动器的桌面上运行。



我在2.5亿到20亿行之间有几张大表,大小在20到150 GB之间。添加索引需要多长时间,主要是在VARCHAR或BIGINT列上,以及最快的方法是什么?

First off this is MySQL 5.6 and MyISAM tables, run on a desktop with a 4.2GHZ I7 16GB RAM and RAID 0 Drives.

I have a few large tables anywhere between 250 million and 2 billion rows, with sizes ranging between 20 and 150 GB. How long should it take to add indexes, mostly on VARCHAR or BIGINT columns, and what is the fastest way to do it?

推荐答案

没有一个好的答案为此,我要做的是制作一个表的子集(比如100,000行)并为其添加索引,同时对其进行计时。然后推断出你的其他表的大小,这应该给你一个粗略的答案。
There isn't a good answer for this, what I would do is to make a subset of your table (let's say 100,000 rows) and add indexes to it, while timing it. Then extrapolate out for the size of your other tables and that should give you a rough answer.


这篇关于MySQL索引20亿行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆