`
hanyh
  • 浏览: 235409 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

mysql数据库插入原来这么快

阅读更多
看见在插入数据量近6000W的时候,还能达到1200条/秒左右
10W条插入所耗时间,插入条数记数(原来表中有1000W记录)
 12.2486999035,100000
12.2773001194,200000
12.2486000061,300000
12.071199894,400000
12.0887999535,500000
12.263600111,600000
12.8111000061,700000
12.8373999596,800000
12.901900053,900000
14.3822999001,1000000
14.4759001732,1100000
12.5479998589,1200000
12.6721999645,1300000
12.7108001709,1400000
12.6102998257,1500000
12.7771999836,1600000
13.2545001507,1700000
13.3555998802,1800000
13.4908001423,1900000
14.0559999943,2000000
14.8170998096,2100000
13.132600069,2200000
13.0569000244,2300000
13.0878999233,2400000
13.361700058,2500000
13.535599947,2600000
13.8598001003,2700000
14.0957000256,2800000
14.1975998878,2900000
14.082100153,3000000
14.7009999752,3100000
13.8789999485,3200000
14.0099000931,3300000
14.3070998192,3400000
14.5513000488,3500000
14.6245000362,3600000
14.6152999401,3700000
14.8347001076,3800000
14.7455999851,3900000
14.8991999626,4000000
15.0450000763,4100000
14.9217998981,4200000
14.9628000259,4300000
15.2028999329,4400000
15.2783000469,4500000
15.5104000568,4600000
15.4739000797,4700000
15.6339998245,4800000
15.7406001091,4900000
15.9275999069,5000000
16.4046001434,5100000
16.3574998379,5200000
16.1486001015,5300000
16.4531998634,5400000
16.5682001114,5500000
16.6905999184,5600000
16.6999001503,5700000
16.958799839,5800000
16.8580000401,5900000
16.9960999489,6000000
17.1826000214,6100000
17.203799963,6200000
17.4459002018,6300000
17.2922999859,6400000
17.5569000244,6500000
17.807199955,6600000
17.8497998714,6700000
17.9196000099,6800000
18.1556999683,6900000
18.4064002037,7000000
18.320499897,7100000
18.4403998852,7200000
18.6754000187,7300000
18.9267001152,7400000
19.0785999298,7500000
19.0410001278,7600000
19.2544999123,7700000
19.1266999245,7800000
19.5298001766,7900000
19.4387998581,8000000
19.4728000164,8100000
19.7027001381,8200000
20.0515999794,8300000
19.959800005,8400000
20.5871999264,8500000
20.2063000202,8600000
20.3708999157,8700000
20.3410999775,8800000
20.4716000557,8900000
20.5167999268,9000000
20.4343001842,9100000
20.7989997864,9200000
21.1456000805,9300000
20.8066999912,9400000
21.0187001228,9500000
21.2816998959,9600000
21.2311000824,9700000
21.4526998997,9800000
21.5680000782,9900000
21.656899929,10000000
21.6686999798,10100000
22.111000061,10200000
22.0908999443,10300000
21.929899931,10400000
22.1587002277,10500000
22.3671998978,10600000
22.6442000866,10700000
22.5406999588,10800000
22.2986998558,10900000
22.7825000286,11000000
22.7992999554,11100000
23.0840001106,11200000
23.0336999893,11300000
23.1243000031,11400000
23.0193998814,11500000
23.2432000637,11600000
23.2276000977,11700000
23.3639998436,11800000
23.7211000919,11900000
23.9835999012,12000000
23.7651000023,12100000
23.7512001991,12200000
23.8873000145,12300000
24.027299881,12400000
24.192800045,12500000
23.9718000889,12600000
24.4296000004,12700000
24.4260997772,12800000
24.546900034,12900000
24.5542001724,13000000
24.7776999474,13100000
24.6698999405,13200000
24.4569001198,13300000
24.6951999664,13400000
25.339099884,13500000
25.0239999294,13600000
25.0064001083,13700000
25.3452999592,13800000
25.204100132,13900000
25.6594998837,14000000
25.1654000282,14100000
25.9886000156,14200000
25.7527999878,14300000
26.1656000614,14400000
25.9951999187,14500000
25.7889001369,14600000
26.6344997883,14700000
26.6328001022,14800000
26.4196000099,14900000
26.6807999611,15000000
27.2302000523,15100000
26.7781000137,15200000
26.5967998505,15300000
26.8879001141,15400000
27.6101000309,15500000
27.2957000732,15600000
27.0910999775,15700000
27.6517000198,15800000
26.7947998047,15900000
28.0234999657,16000000
27.4553000927,16100000
28.0745000839,16200000
28.2358000278,16300000
27.3213000298,16400000
28.6037998199,16500000
28.0062000751,16600000
28.3991000652,16700000
28.1582999229,16800000
32.2086000443,16900000
28.7537000179,17000000
29.0751998425,17100000
29.1440000534,17200000
29.3770999908,17300000
29.4169001579,17400000
29.6337997913,17500000
30.0696001053,17600000
30.6554000378,17700000
29.4310998917,17800000
30.3331000805,17900000
30.3801000118,18000000
30.7383999825,18100000
30.2995998859,18200000
33.7615001202,18300000
31.6524000168,18400000
30.5258998871,18500000
34.0257999897,18600000
34.9193999767,18700000
33.0338001251,18800000
34.0789000988,18900000
33.1794998646,19000000
31.6475000381,19100000
32.1933999062,19200000
33.4735000134,19300000
31.7174999714,19400000
33.2877001762,19500000
32.1487998962,19600000
33.2555000782,19700000
32.7623000145,19800000
33.1905999184,19900000
34.0055000782,20000000
33.1561999321,20100000
35.1417000294,20200000
33.367399931,20300000
35.7843999863,20400000
36.7400000095,20500000
33.1805000305,20600000
36.9372000694,20700000
34.1338000298,20800000
35.1993999481,20900000
35.8675999641,21000000
36.9663999081,21100000
34.8279001713,21200000
35.6563999653,21300000
35.8894000053,21400000
36.3938999176,21500000
38.5266001225,21600000
36.6399998665,21700000
37.6226000786,21800000
38.1543998718,21900000
38.5796000957,22000000
38.3436999321,22100000
39.1947000027,22200000
37.6328999996,22300000
39.6203000546,22400000
39.4546000957,22500000
38.6617000103,22600000
39.0267999172,22700000
37.9974999428,22800000
38.3812999725,22900000
39.940100193,23000000
39.7571997643,23100000
41.2875001431,23200000
41.5404999256,23300000
40.7610001564,23400000
41.8004999161,23500000
42.1679000854,23600000
41.9339997768,23700000
41.7352001667,23800000
43.3998000622,23900000
42.4329998493,24000000
39.1254999638,24100000
44.9327001572,24200000
41.6333999634,24300000
43.3292000294,24400000
41.7788999081,24500000
43.5234000683,24600000
42.070800066,24700000
41.0221998692,24800000
43.4491000175,24900000
46.4379000664,25000000
41.7186999321,25100000
46.831799984,25200000
44.2395999432,25300000
43.4153001308,25400000
44.6652998924,25500000
43.9562001228,25600000
46.3626999855,25700000
44.1856000423,25800000
45.0042998791,25900000
46.057199955,26000000
45.6150000095,26100000
47.9551000595,26200000
47.8659999371,26300000
46.943500042,26400000
43.3299999237,26500000
48.3272001743,26600000
48.5866999626,26700000
45.5722999573,26800000
47.7732000351,26900000
48.0304999352,27000000
48.5861001015,27100000
47.2967998981,27200000
48.1663000584,27300000
50.4007999897,27400000
45.4955000877,27500000
48.2566998005,27600000
47.2832000256,27700000
50.2713999748,27800000
50.3858001232,27900000
49.4679999352,28000000
47.540199995,28100000
48.1375000477,28200000
48.6847999096,28300000
49.0120000839,28400000
49.0631000996,28500000
50.8278999329,28600000
48.1701998711,28700000
51.5357999802,28800000
50.6555001736,28900000
53.1036000252,29000000
52.1669998169,29100000
49.3230001926,29200000
50.9656999111,29300000
49.7874999046,29400000
50.7863001823,29500000
49.8136999607,29600000
51.9593999386,29700000
50.0864999294,29800000
51.81580019,29900000
52.5038998127,30000000
51.1518001556,30100000
52.9553999901,30200000
51.9770998955,30300000
53.882600069,30400000
52.2116999626,30500000
51.6082999706,30600000
53.7332000732,30700000
52.3059999943,30800000
54.3629999161,30900000
53.8654000759,31000000
54.0276999474,31100000
53.6031000614,31200000
56.0248000622,31300000
57.5386998653,31400000
55.9721999168,31500000
52.6082000732,31600000
56.8238999844,31700000
56.5429000854,31800000
53.3559000492,31900000
57.1378998756,32000000
56.682199955,32100000
55.3266000748,32200000
54.7256000042,32300000
57.0369000435,32400000
55.9660000801,32500000
56.8484997749,32600000
57.5836000443,32700000
56.4453999996,32800000
59.7303001881,32900000
58.4358999729,33000000
55.7349998951,33100000
57.4081001282,33200000
60.8865997791,33300000
56.9210000038,33400000
57.0472002029,33500000
59.6772999763,33600000
59.4013998508,33700000
61.0856001377,33800000
59.5011999607,33900000
58.1245000362,34000000
56.8032999039,34100000
57.9897999763,34200000
61.4467000961,34300000
59.3474998474,34400000
61.5369000435,34500000
62.6307001114,34600000
59.2035000324,34700000
62.1108000278,34800000
60.6574997902,34900000
60.7944002151,35000000
61.9622998238,35100000
61.9018001556,35200000
62.8722999096,35300000
61.0866000652,35400000
61.5144000053,35500000
60.3595998287,35600000
63.6665999889,35700000
59.234400034,35800000
59.0834000111,35900000
63.1390001774,36000000
60.8925998211,36100000
62.8141000271,36200000
64.6373000145,36300000
62.5455000401,36400000
64.0552999973,36500000
65.4214000702,36600000
65.1696000099,36700000
60.9802999496,36800000
63.6466999054,36900000
63.2336001396,37000000
64.0469999313,37100000
64.6075999737,37200000
63.606400013,37300000
67.9556999207,37400000
65.7712001801,37500000
66.1088998318,37600000
65.1012001038,37700000
64.3677999973,37800000
68.0092999935,37900000
64.5852000713,38000000
66.5604000092,38100000
64.8236999512,38200000
66.9061000347,38300000
65.8600997925,38400000
64.2164001465,38500000
67.7976000309,38600000
65.4519999027,38700000
65.6717000008,38800000
65.9098000526,38900000
65.5327999592,39000000
64.948800087,39100000
67.7074999809,39200000
68.8580999374,39300000
68.4841001034,39400000
69.5140998363,39500000
69.2734999657,39600000
68.4520001411,39700000
67.8055000305,39800000
68.0646998882,39900000
70.339400053,40000000
66.9813001156,40100000
67.7600998878,40200000
69.3273999691,40300000
69.9965999126,40400000
69.4271001816,40500000
69.6394000053,40600000
70.5745999813,40700000
70.6203999519,40800000
72.4144999981,40900000
69.5153999329,41000000
71.078400135,41100000
70.5827999115,41200000
71.0317001343,41300000
69.0655999184,41400000
68.2876999378,41500000
70.3619999886,41600000
71.8556001186,41700000
71.0929000378,41800000
71.5339999199,41900000
73.1438999176,42000000
70.9713001251,42100000
71.9715998173,42200000
69.0513000488,42300000
72.617000103,42400000
71.3059999943,42500000
70.3457000256,42600000
74.6914999485,42700000
72.9921000004,42800000
72.4965000153,42900000
74.6779999733,43000000
71.793200016,43100000
72.5945000648,43200000
73.5264999866,43300000
74.3315999508,43400000
74.0174000263,43500000
73.7207999229,43600000
71.5483000278,43700000
74.5278000832,43800000
70.5735998154,43900000
72.9801001549,44000000
70.3861000538,44100000
76.1578998566,44200000
74.9391000271,44300000
74.238699913,44400000
76.2427999973,44500000
74.2488000393,44600000
73.1296000481,44700000
75.1103000641,44800000
76.4396998882,44900000
75.4574000835,45000000
76.2295000553,45100000
75.5018999577,45200000
78.0773999691,45300000
73.2374000549,45400000
75.1116998196,45500000
78.1565001011,45600000
75.5194001198,45700000
74.2967998981,45800000
77.8838999271,45900000
73.4882001877,46000000
76.2270998955,46100000
77.8396000862,46200000
76.1662998199,46300000
76.1633000374,46400000
78.557500124,46500000
74.4247000217,46600000
76.2005999088,46700000
78.2168998718,46800000
76.527200222,46900000
77.2237999439,47000000
78.0637998581,47100000
78.5652000904,47200000
75.3833999634,47300000
75.9161999226,47400000
79.5389001369,47500000
77.780600071,47600000
80.0218999386,47700000
75.6284000874,47800000
79.8923997879,47900000
77.7213001251,48000000

插入的文章见:
http://hanyh.iteye.com/admin/blogs/434077

1,机器为4核16G内存,脚本和数据库在同一机器上跑,插入的速度还能快更多。
2,mysql为5.1.30


回复要先做题,太麻烦了,直接改原贴。
对1楼的回复,需要说明几个问题
1,oracle版本和基本配置(oracle所用的内存,缓冲是多大?)
2,所在的硬件环境

---------------
3,我的相关文章注明了,插入脚本和数据库是在同一个机器上,为了模拟真实的负载,100个并发连接全是单独直接连接数据库,并没有把全部硬件资源用在数据库上,mysqld的配置也有限
4,即使oracle在大数据量快一点也是正常的,但是这足够证明mysql不慢!!!单表这个插入速度的量对绝大部分应用足够了。
分享到:
评论
2 楼 若水上善 2009-09-21  
mysql插入响应速度是很快的,但是并发查询似乎不是很快。如果有这么多条的话,还是建议用oracle或者mysql集群,否则硬盘的速度跟不上的。
1 楼 seujacky 2009-07-29  
看见在插入数据量近6000W的时候,还能达到1200条/秒左右



这个也叫快?前天我插入的速度是1万条每秒。数据库是oracle的。java程序。数据还是从文件中解析出来的文件有300多个数据量是6千多万条。

相关推荐

    python使用Django库向mysql数据库插入数据

    结合MySQL数据库,我们可以创建稳健的数据存储系统。本教程将详细介绍如何使用Django与MySQL协同工作,实现数据的插入操作。 首先,确保你已经安装了Python、Django和MySQL的相关库。Python的安装是基础,Django...

    Java连接MySql数据库,并且实现插入、删除、更新、选择操作.pdf

    Java 连接 MySql 数据库,并实现插入、删除、更新、选择操作 Java 连接 MySql 数据库是 Java 程序员中非常常见的一种操作。通过使用 JDBC(Java Database Connectivity,Java 数据库连接)驱动程序,可以轻松地连接...

    C++连接mysql数据库 源代码

    1. **MySQL C++ Connector**: 连接MySQL数据库时,通常会使用MySQL官方提供的C++ Connector,这是一个用于C++应用程序的数据库驱动程序,它提供了与MySQL服务器通信的接口。通过该接口,C++程序能够执行SQL查询,...

    VB6.0连接MySQL数据库

    本文将详细地介绍新手如何使用VB6.0连接MySQL数据库,并提供清晰的步骤。 首先,要使VB6.0能够连接到MySQL数据库,需要在VB6.0的应用程序中引用MySQL的数据库引擎。由于VB6.0本身并不直接支持MySQL,所以一般需要...

    MySQL数据库MySQL数据库.ppt

    【MySQL数据库概述】 MySQL是一种流行的开源关系型数据库管理系统(RDBMS),由Oracle公司维护。它的名字由创始人Michael Widenius的女儿My和SQL(Structured Query Language)组合而成。MySQL以其高效、可靠和易于...

    完整版 MySQL8.0从入门到精通 MySQL数据库教程 全套PPT课件资源集合 共26个章节 含全部源代码.rar

    完整版 MySQL8.0从入门到精通 MySQL数据库教程 第08章 插入、更新与删除数据(共12页).ppt 完整版 MySQL8.0从入门到精通 MySQL数据库教程 第09章 索引(共13页).ppt 完整版 MySQL8.0从入门到精通 MySQL数据库教程 ...

    WPF+C#实现为MySQL数据库中的表添加新的一列

    本文将深入探讨如何使用C#编程语言与Windows操作系统中的CMD.exe(命令提示符)结合,来实现为MySQL数据库中的表添加新的一列,并设定默认值。这种方法在数据库结构需要动态调整或者在应用程序中进行自动化数据库...

    88秒插入1000万条数据到MySQL数据库表的操作方法

    我用到的数据库为,mysql数据库5.7版本的 首先自己准备好数据库表 其实我在插入1000万条数据的时候遇到了一些问题,现在先来解决他们,一开始我插入100万条数据时候报错,控制台的信息如下: ... You can change this ...

    MySQL数据库-RevD.pdf

    MySQL数据库概览 MySQL是由瑞典MySQL AB公司开发的小型数据库管理系统,它属于开源软件范畴,意味着其源代码是开放的,可以被公众查看和修改。MySQL广泛应用于从大型企业系统到专用的嵌入式应用系统中,支持各种不同...

    MySQL数据库应用形考实验1-4全答案.zip

    MySQL数据库是一种广泛应用于Web开发和企业级数据存储的开源关系型数据库管理系统。在这个"MySQL数据库应用形考实验1-4全答案.zip"压缩包中,包含了四个关于MySQL基础操作的实验训练,涵盖了从数据库和表的创建,到...

    MySQL数据库基础与实例教程所有资源

    MySQL数据库是一种广泛使用的开源关系型数据库管理系统,以其高效、可靠和易于学习的特性深受开发者喜爱。本教程将全面介绍MySQL的基础知识,并通过实例帮助你掌握其核心操作。 首先,我们来了解一下MySQL的基本...

    MySQL数据库入门.rar

    MySQL数据库是目前世界上最受欢迎的关系型数据库管理系统之一,尤其在互联网应用中被广泛使用。这个"MySQL数据库入门"压缩包提供了一系列的学习资源,包括PPT、PDF文档和代码示例,帮助初学者快速掌握MySQL的基础...

    Python 数据库编程 09操作MySQL数据库插入数据.mp4

    Python 数据库编程 09操作MySQL数据库插入数据.mp4

    MySQL数据库备份和恢复

    ### MySQL数据库备份与恢复:深度解析与实践指南 在当今数据驱动的世界中,数据库的稳定性和数据的安全性显得尤为重要。MySQL作为全球最流行的开源关系型数据库管理系统之一,其备份和恢复策略是确保数据安全和系统...

    pbootcms数据sqlite转mysql数据库

    标题 "pbootcms数据sqlite转mysql数据库" 涉及的是一个常见的数据库迁移过程,从SQLite数据库系统转换到MySQL数据库系统。这个过程在网站或应用的开发和维护中经常遇到,尤其是在更换数据库服务或者需要更强大的...

    MySQL数据库原理及应用(第2版)(微课版)-教学用数据库(Mysql数据库备份文件).zip

    MySQL数据库是世界上最受欢迎的开源关系型数据库管理系统之一,其设计理念在于提供快速、可靠的数据存储解决方案。在《MySQL数据库原理及应用(第2版)(微课版)》中,我们通常会深入探讨数据库的基本概念、设计...

    eclipse连接MySQL数据库

    本文档将详细介绍如何使用Eclipse连接MySQL数据库,包括安装MySQL、创建数据库和表、使用JDBC驱动连接数据库、执行SQL语句、插入数据等内容。 一、安装MySQL 在开始使用Eclipse连接MySQL数据库之前,需要首先安装...

    mysql数据库数据库数据库数据库数据库

    根据提供的文件信息,可以看出本文主要围绕MySQL数据库的基本操作与管理展开。尽管原文存在大量重复以及表述不清晰的地方,但还是可以从中提炼出一系列关键知识点。接下来将这些知识点进行整理和扩展,以便更好地...

    mysql数据库基本操作

    MySQL数据库是一种广泛使用的开源关系型数据库管理系统,以其高效、稳定和易于管理的特性深受开发者喜爱。在本篇文章中,我们将深入探讨MySQL数据库的基本操作,包括数据的增、删、改、查(CRUD)以及一些核心概念。...

    C# MySQL数据库例子源码.rar

    在本文中,我们将深入探讨如何使用C#语言与MySQL数据库进行交互。首先,我们要了解C#是一种面向对象的编程语言,广泛应用于开发Windows桌面应用、Web应用以及移动应用。而MySQL则是一种流行的开源关系型数据库管理...

Global site tag (gtag.js) - Google Analytics