SlideShare a Scribd company logo
1 of 15
Test character set

    Philip zhong
One transaction contain following
              statements
• Point queries: SELECT c FROM test_latin WHERE id=N
• Range queries: SELECT c FROM test_latin WHERE id BETWEEN N AND M
• Range SUM() queries: SELECT SUM(K) FROM test_latin WHERE id
  BETWEEN N and M
• Range ORDER BY queries:SELECT c FROM test_latin WHERE id between N
  and M ORDER BY c
• Range DISTINCT queries:SELECT DISTINCT c FROM test_latin WHERE id
  BETWEEN N and M ORDER BY c
• UPDATEs on index column:UPDATE test_latin SET k=k+1 WHERE id=N
• UPDATEs on non-index column:UPDATE test_latin SET c=N WHERE id=M
• DELETE queries:DELETE FROM test_latin WHERE id=N
• INSERT queries:INSERT INTO test_latin VALUES (...)
Set session parameters
• Set Limit for total number of requests=500
• Set inserting records =1000000
• Set Range size for range queries=100
• Set Number of point select queries in a single transaction=10
• Set Number of simple range queries in a single transaction=1
• Set Number of SUM range queries in a single transaction=1
• Set Number of ORDER range queries in a single transaction=1
• Set Number of DISTINCT range queries in a single transaction =1
• Set Number of index UPDATE queries in a single transaction=1
• Set Number of non-index UPDATE queries in a single transaction =1
• Set Time in microseconds to sleep after each connection to database =
  1000
• Set Minimum time in microseconds to sleep after each request =0
• Set Maximum time in microseconds to sleep after each request =0
Tables structure
CREATE TABLE test_latin (
  id int(10) unsigned NOT NULL,
  k int(10) unsigned NOT NULL DEFAULT '0',
  c char(120) NOT NULL DEFAULT '',
  pad char(60) NOT NULL DEFAULT '',
  PRIMARY KEY (id),
  KEY k (k)
) ENGINE=InnoDB DEFAULT CHARSET=latin1

CREATE TABLE test_utf8 (
  id int(10) unsigned NOT NULL,
  k int(10) unsigned NOT NULL DEFAULT '0',
  c char(120) NOT NULL DEFAULT '',
  pad char(60) NOT NULL DEFAULT '',
  PRIMARY KEY (id),
  KEY k (k)
) ENGINE=InnoDB DEFAULT CHARSET=utf8
Create testing data scripts
DROP PROCEDURE IF EXISTS insert_data_english;
DELIMITER //
CREATE PROCEDURE insert_data_english()
BEGIN
  DECLARE vCount      bigint(12) DEFAULT 1;
  DECLARE vK       bigint(12) DEFAULT 1;
  DECLARE vbuyerName varchar(128) DEFAULT '0bzhonglizhongli';
    DECLARE vSellerName varchar(128) DEFAULT '0szhonglizhongli';

  SET AUTOCOMMIT=0;

  WHILE vCount<=1000000 DO
  INSERT INTO test_latin(id,k,c,pad)
  VALUES(vCount,vK,vSellerName,vbuyerName);

   INSERT INTO test_utf8(id,k,c,pad)
   VALUES(vCount,vK,vSellerName,vbuyerName);
    set vCount=vCount+1;
    IF MOD(vCount,5000)=0 THEN
      set vK=vK+1;
      set vbuyerName=concat(vCount,'bzhonglizhongli');
      set vSellerName=concat(vCount,'szhonglizhongli');
      COMMIT;
    END IF;
   END WHILE;
   COMMIT;
END;
//
DELIMITER ;
Result --using English characters
Name         latin1                                 utf8
Concurrent   Transactions:141.17 per sec            Transactions:96.88 per sec
threads=8    read/write requests:2682.26 per sec.   read/write requests:1840.80 per sec
             total time:3.5418s                     total time:5.1608s
Concurrent   Transactions:180.04 per sec            Transactions:169.45 per sec
threads=16   read/write requests:3420.82 per sec    read/write requests:3219.54 per sec
             total time:2.7771s                     total time:2.9507s
Latin(English) Result
Concurrent threads=8
UTF8(English) Result
Concurrent threads=8
Latin(English) Result
Concurrent threads=16
UTF8(English) Result
Concurrent threads=16
Result --using Chinese characters
Name         latin1                                utf8

Concurrent   Transactions:177.59 per sec           Transactions:115.20 per sec
threads=8    read/write requests:3374.16 per sec   read/write requests:2188.76 per sec
             total time:2.8155s                    total time:4.3404s

Concurrent   Transactions:160.13 per sec           Transactions:123.72 per sec
threads=16   read/write requests:3042.41 per sec   read/write requests:2350.69 per sec
             total time:3.1225s                    total time:4.0414s
Latin(Chinese) Result
Concurrent threads=8
UTF8(Chinese) Result
Concurrent threads=8
Latin(Chinese) Result
Concurrent threads=16
UTF8(Chinese) Result
Concurrent threads=16

More Related Content

What's hot

Wprowadzenie do technologi Big Data i Apache Hadoop
Wprowadzenie do technologi Big Data i Apache HadoopWprowadzenie do technologi Big Data i Apache Hadoop
Wprowadzenie do technologi Big Data i Apache Hadoop
Sages
 
What is row level isolation on cassandra
What is row level isolation on cassandraWhat is row level isolation on cassandra
What is row level isolation on cassandra
Kazutaka Tomita
 
Data structure programs in c++
Data structure programs in c++Data structure programs in c++
Data structure programs in c++
mmirfan
 
Intravert Server side processing for Cassandra
Intravert Server side processing for CassandraIntravert Server side processing for Cassandra
Intravert Server side processing for Cassandra
Edward Capriolo
 

What's hot (20)

Prometheus Storage
Prometheus StoragePrometheus Storage
Prometheus Storage
 
Deep dive into PostgreSQL statistics.
Deep dive into PostgreSQL statistics.Deep dive into PostgreSQL statistics.
Deep dive into PostgreSQL statistics.
 
The Ring programming language version 1.6 book - Part 71 of 189
The Ring programming language version 1.6 book - Part 71 of 189The Ring programming language version 1.6 book - Part 71 of 189
The Ring programming language version 1.6 book - Part 71 of 189
 
Node.js flow control
Node.js flow controlNode.js flow control
Node.js flow control
 
Rop and it's friends
Rop and it's friendsRop and it's friends
Rop and it's friends
 
The Ring programming language version 1.5.3 book - Part 25 of 184
The Ring programming language version 1.5.3 book - Part 25 of 184The Ring programming language version 1.5.3 book - Part 25 of 184
The Ring programming language version 1.5.3 book - Part 25 of 184
 
Wprowadzenie do technologi Big Data i Apache Hadoop
Wprowadzenie do technologi Big Data i Apache HadoopWprowadzenie do technologi Big Data i Apache Hadoop
Wprowadzenie do technologi Big Data i Apache Hadoop
 
Numerical Methods with Computer Programming
Numerical Methods with Computer ProgrammingNumerical Methods with Computer Programming
Numerical Methods with Computer Programming
 
Масштабируемая конфигурация Nginx, Игорь Сысоев (Nginx)
Масштабируемая конфигурация Nginx, Игорь Сысоев (Nginx)Масштабируемая конфигурация Nginx, Игорь Сысоев (Nginx)
Масштабируемая конфигурация Nginx, Игорь Сысоев (Nginx)
 
What is row level isolation on cassandra
What is row level isolation on cassandraWhat is row level isolation on cassandra
What is row level isolation on cassandra
 
Data structure programs in c++
Data structure programs in c++Data structure programs in c++
Data structure programs in c++
 
All you need to know about the JavaScript event loop
All you need to know about the JavaScript event loopAll you need to know about the JavaScript event loop
All you need to know about the JavaScript event loop
 
Ac2
Ac2Ac2
Ac2
 
Intravert Server side processing for Cassandra
Intravert Server side processing for CassandraIntravert Server side processing for Cassandra
Intravert Server side processing for Cassandra
 
Профилирование и оптимизация производительности Ruby-кода
Профилирование и оптимизация производительности Ruby-кодаПрофилирование и оптимизация производительности Ruby-кода
Профилирование и оптимизация производительности Ruby-кода
 
Nodejs - Should Ruby Developers Care?
Nodejs - Should Ruby Developers Care?Nodejs - Should Ruby Developers Care?
Nodejs - Should Ruby Developers Care?
 
Zone.js 2017
Zone.js 2017Zone.js 2017
Zone.js 2017
 
Refactoring for testability c++
Refactoring for testability c++Refactoring for testability c++
Refactoring for testability c++
 
Understanding the nodejs event loop
Understanding the nodejs event loopUnderstanding the nodejs event loop
Understanding the nodejs event loop
 
Non-Relational Postgres / Bruce Momjian (EnterpriseDB)
Non-Relational Postgres / Bruce Momjian (EnterpriseDB)Non-Relational Postgres / Bruce Momjian (EnterpriseDB)
Non-Relational Postgres / Bruce Momjian (EnterpriseDB)
 

Viewers also liked

617 f007c bc34-4058-8844c0949af09bcf
617 f007c bc34-4058-8844c0949af09bcf617 f007c bc34-4058-8844c0949af09bcf
617 f007c bc34-4058-8844c0949af09bcf
Carlos Carvalho
 
Asia pacopenstack swiftstack-joe-arnold-2012-08-11
Asia pacopenstack swiftstack-joe-arnold-2012-08-11Asia pacopenstack swiftstack-joe-arnold-2012-08-11
Asia pacopenstack swiftstack-joe-arnold-2012-08-11
OpenCity Community
 
KVH Carrier Solutions
KVH Carrier SolutionsKVH Carrier Solutions
KVH Carrier Solutions
KVH Co. Ltd.
 
5 books for your business understanBooks
5 books for your business understanBooks5 books for your business understanBooks
5 books for your business understanBooks
Haridas Patel
 
เครื่องใช้ไฟฟ้า
เครื่องใช้ไฟฟ้าเครื่องใช้ไฟฟ้า
เครื่องใช้ไฟฟ้า
thananat
 
Wk gets social_google+
Wk gets social_google+Wk gets social_google+
Wk gets social_google+
floin1856
 
Ma4 set-u-s54
Ma4 set-u-s54Ma4 set-u-s54
Ma4 set-u-s54
Koku Love
 

Viewers also liked (20)

Ig3 2012_assignment
 Ig3 2012_assignment Ig3 2012_assignment
Ig3 2012_assignment
 
Found fonts
Found fontsFound fonts
Found fonts
 
Projekt E- građani: Središnji državni portal
Projekt E- građani: Središnji državni portalProjekt E- građani: Središnji državni portal
Projekt E- građani: Središnji državni portal
 
pre launch project in Bhiwadi 9717762246
pre launch project in Bhiwadi 9717762246pre launch project in Bhiwadi 9717762246
pre launch project in Bhiwadi 9717762246
 
العلم قوة -صناع الحياة المنوفية
العلم قوة -صناع الحياة المنوفيةالعلم قوة -صناع الحياة المنوفية
العلم قوة -صناع الحياة المنوفية
 
617 f007c bc34-4058-8844c0949af09bcf
617 f007c bc34-4058-8844c0949af09bcf617 f007c bc34-4058-8844c0949af09bcf
617 f007c bc34-4058-8844c0949af09bcf
 
Alanne: Yhteisöllisyyteen kannustava vanhempainmalli - nuorten päihteettömyyt...
Alanne: Yhteisöllisyyteen kannustava vanhempainmalli - nuorten päihteettömyyt...Alanne: Yhteisöllisyyteen kannustava vanhempainmalli - nuorten päihteettömyyt...
Alanne: Yhteisöllisyyteen kannustava vanhempainmalli - nuorten päihteettömyyt...
 
Asia pacopenstack swiftstack-joe-arnold-2012-08-11
Asia pacopenstack swiftstack-joe-arnold-2012-08-11Asia pacopenstack swiftstack-joe-arnold-2012-08-11
Asia pacopenstack swiftstack-joe-arnold-2012-08-11
 
BID NEXT 20 Mei Presentaties OCW Werkgroepen (DRAFT)
BID NEXT 20 Mei Presentaties OCW Werkgroepen (DRAFT)BID NEXT 20 Mei Presentaties OCW Werkgroepen (DRAFT)
BID NEXT 20 Mei Presentaties OCW Werkgroepen (DRAFT)
 
KVH Carrier Solutions
KVH Carrier SolutionsKVH Carrier Solutions
KVH Carrier Solutions
 
5 books for your business understanBooks
5 books for your business understanBooks5 books for your business understanBooks
5 books for your business understanBooks
 
เครื่องใช้ไฟฟ้า
เครื่องใช้ไฟฟ้าเครื่องใช้ไฟฟ้า
เครื่องใช้ไฟฟ้า
 
Mif special print_offer - 14.09.2011
Mif special print_offer - 14.09.2011Mif special print_offer - 14.09.2011
Mif special print_offer - 14.09.2011
 
Aрхивация данных
Aрхивация данныхAрхивация данных
Aрхивация данных
 
Studio appartment in taj expressway 7428424386
Studio appartment in taj expressway 7428424386Studio appartment in taj expressway 7428424386
Studio appartment in taj expressway 7428424386
 
Wk gets social_google+
Wk gets social_google+Wk gets social_google+
Wk gets social_google+
 
Modena
ModenaModena
Modena
 
Simo Corporation Overview
Simo Corporation OverviewSimo Corporation Overview
Simo Corporation Overview
 
Ma4 set-u-s54
Ma4 set-u-s54Ma4 set-u-s54
Ma4 set-u-s54
 
Storyboard.
Storyboard.Storyboard.
Storyboard.
 

Similar to Mysql5.1 character set testing

Gotcha! Ruby things that will come back to bite you.
Gotcha! Ruby things that will come back to bite you.Gotcha! Ruby things that will come back to bite you.
Gotcha! Ruby things that will come back to bite you.
David Tollmyr
 
Building High-Performance Language Implementations With Low Effort
Building High-Performance Language Implementations With Low EffortBuilding High-Performance Language Implementations With Low Effort
Building High-Performance Language Implementations With Low Effort
Stefan Marr
 
Lecture 2 coal sping12
Lecture 2 coal sping12Lecture 2 coal sping12
Lecture 2 coal sping12
Rabia Khalid
 
Полнотекстовый поиск в PostgreSQL за миллисекунды (Олег Бартунов, Александр К...
Полнотекстовый поиск в PostgreSQL за миллисекунды (Олег Бартунов, Александр К...Полнотекстовый поиск в PostgreSQL за миллисекунды (Олег Бартунов, Александр К...
Полнотекстовый поиск в PostgreSQL за миллисекунды (Олег Бартунов, Александр К...
Ontico
 
A Replay Approach to Software Validation
A Replay Approach to Software ValidationA Replay Approach to Software Validation
A Replay Approach to Software Validation
James Pascoe
 

Similar to Mysql5.1 character set testing (20)

Load Data Fast!
Load Data Fast!Load Data Fast!
Load Data Fast!
 
The TclQuadcode Compiler
The TclQuadcode CompilerThe TclQuadcode Compiler
The TclQuadcode Compiler
 
Abstracting Vector Architectures in Library Generators: Case Study Convolutio...
Abstracting Vector Architectures in Library Generators: Case Study Convolutio...Abstracting Vector Architectures in Library Generators: Case Study Convolutio...
Abstracting Vector Architectures in Library Generators: Case Study Convolutio...
 
Gotcha! Ruby things that will come back to bite you.
Gotcha! Ruby things that will come back to bite you.Gotcha! Ruby things that will come back to bite you.
Gotcha! Ruby things that will come back to bite you.
 
C++ and OOPS Crash Course by ACM DBIT | Grejo Joby
C++ and OOPS Crash Course by ACM DBIT | Grejo JobyC++ and OOPS Crash Course by ACM DBIT | Grejo Joby
C++ and OOPS Crash Course by ACM DBIT | Grejo Joby
 
Meet Up - Spark Stream Processing + Kafka
Meet Up - Spark Stream Processing + KafkaMeet Up - Spark Stream Processing + Kafka
Meet Up - Spark Stream Processing + Kafka
 
Building High-Performance Language Implementations With Low Effort
Building High-Performance Language Implementations With Low EffortBuilding High-Performance Language Implementations With Low Effort
Building High-Performance Language Implementations With Low Effort
 
Reverse Engineering Dojo: Enhancing Assembly Reading Skills
Reverse Engineering Dojo: Enhancing Assembly Reading SkillsReverse Engineering Dojo: Enhancing Assembly Reading Skills
Reverse Engineering Dojo: Enhancing Assembly Reading Skills
 
Story of static code analyzer development
Story of static code analyzer developmentStory of static code analyzer development
Story of static code analyzer development
 
Instruction sets picc done by Priyanga KR
Instruction sets   picc done by Priyanga KRInstruction sets   picc done by Priyanga KR
Instruction sets picc done by Priyanga KR
 
Java/Scala Lab: Анатолий Кметюк - Scala SubScript: Алгебра для реактивного пр...
Java/Scala Lab: Анатолий Кметюк - Scala SubScript: Алгебра для реактивного пр...Java/Scala Lab: Анатолий Кметюк - Scala SubScript: Алгебра для реактивного пр...
Java/Scala Lab: Анатолий Кметюк - Scala SubScript: Алгебра для реактивного пр...
 
Hands on with smart contracts 2. Presentation for the Blockchain Applications...
Hands on with smart contracts 2. Presentation for the Blockchain Applications...Hands on with smart contracts 2. Presentation for the Blockchain Applications...
Hands on with smart contracts 2. Presentation for the Blockchain Applications...
 
Lecture 2 coal sping12
Lecture 2 coal sping12Lecture 2 coal sping12
Lecture 2 coal sping12
 
Полнотекстовый поиск в PostgreSQL за миллисекунды (Олег Бартунов, Александр К...
Полнотекстовый поиск в PostgreSQL за миллисекунды (Олег Бартунов, Александр К...Полнотекстовый поиск в PostgreSQL за миллисекунды (Олег Бартунов, Александр К...
Полнотекстовый поиск в PostgreSQL за миллисекунды (Олег Бартунов, Александр К...
 
Solr @ Etsy - Apache Lucene Eurocon
Solr @ Etsy - Apache Lucene EuroconSolr @ Etsy - Apache Lucene Eurocon
Solr @ Etsy - Apache Lucene Eurocon
 
Mutation @ Spotify
Mutation @ Spotify Mutation @ Spotify
Mutation @ Spotify
 
Big Data Day LA 2016/ Hadoop/ Spark/ Kafka track - Data Provenance Support in...
Big Data Day LA 2016/ Hadoop/ Spark/ Kafka track - Data Provenance Support in...Big Data Day LA 2016/ Hadoop/ Spark/ Kafka track - Data Provenance Support in...
Big Data Day LA 2016/ Hadoop/ Spark/ Kafka track - Data Provenance Support in...
 
A Replay Approach to Software Validation
A Replay Approach to Software ValidationA Replay Approach to Software Validation
A Replay Approach to Software Validation
 
An Embedded Error Recovery and Debugging Mechanism for Scripting Language Ext...
An Embedded Error Recovery and Debugging Mechanism for Scripting Language Ext...An Embedded Error Recovery and Debugging Mechanism for Scripting Language Ext...
An Embedded Error Recovery and Debugging Mechanism for Scripting Language Ext...
 
Kotlin Backend Development 6 Yrs Recap. The Good, the Bad and the Ugly
Kotlin Backend Development 6 Yrs Recap. The Good, the Bad and the UglyKotlin Backend Development 6 Yrs Recap. The Good, the Bad and the Ugly
Kotlin Backend Development 6 Yrs Recap. The Good, the Bad and the Ugly
 

More from Philip Zhong (12)

Cisco Webex Distributed Framework and Data Store Design
Cisco Webex Distributed Framework and Data Store DesignCisco Webex Distributed Framework and Data Store Design
Cisco Webex Distributed Framework and Data Store Design
 
How to Implement Distributed Data Store
How to Implement Distributed Data Store How to Implement Distributed Data Store
How to Implement Distributed Data Store
 
MongoDB Knowledge Shareing
MongoDB Knowledge ShareingMongoDB Knowledge Shareing
MongoDB Knowledge Shareing
 
Adapter Poxy Pattern
Adapter Poxy PatternAdapter Poxy Pattern
Adapter Poxy Pattern
 
How to estimate_oracle_cost
How to estimate_oracle_costHow to estimate_oracle_cost
How to estimate_oracle_cost
 
Mongo db program_installation_guide
Mongo db program_installation_guideMongo db program_installation_guide
Mongo db program_installation_guide
 
Mongo db sharding_cluster_installation_guide
Mongo db sharding_cluster_installation_guideMongo db sharding_cluster_installation_guide
Mongo db sharding_cluster_installation_guide
 
Vitess percona 2012
Vitess percona 2012Vitess percona 2012
Vitess percona 2012
 
Distributed_Database_System
Distributed_Database_SystemDistributed_Database_System
Distributed_Database_System
 
Mysql performance tuning
Mysql performance tuningMysql performance tuning
Mysql performance tuning
 
How to write_language_compiler
How to write_language_compilerHow to write_language_compiler
How to write_language_compiler
 
Mysql architecture&parameters
Mysql architecture&parametersMysql architecture&parameters
Mysql architecture&parameters
 

Recently uploaded

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 

Recently uploaded (20)

Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 

Mysql5.1 character set testing

  • 1. Test character set Philip zhong
  • 2. One transaction contain following statements • Point queries: SELECT c FROM test_latin WHERE id=N • Range queries: SELECT c FROM test_latin WHERE id BETWEEN N AND M • Range SUM() queries: SELECT SUM(K) FROM test_latin WHERE id BETWEEN N and M • Range ORDER BY queries:SELECT c FROM test_latin WHERE id between N and M ORDER BY c • Range DISTINCT queries:SELECT DISTINCT c FROM test_latin WHERE id BETWEEN N and M ORDER BY c • UPDATEs on index column:UPDATE test_latin SET k=k+1 WHERE id=N • UPDATEs on non-index column:UPDATE test_latin SET c=N WHERE id=M • DELETE queries:DELETE FROM test_latin WHERE id=N • INSERT queries:INSERT INTO test_latin VALUES (...)
  • 3. Set session parameters • Set Limit for total number of requests=500 • Set inserting records =1000000 • Set Range size for range queries=100 • Set Number of point select queries in a single transaction=10 • Set Number of simple range queries in a single transaction=1 • Set Number of SUM range queries in a single transaction=1 • Set Number of ORDER range queries in a single transaction=1 • Set Number of DISTINCT range queries in a single transaction =1 • Set Number of index UPDATE queries in a single transaction=1 • Set Number of non-index UPDATE queries in a single transaction =1 • Set Time in microseconds to sleep after each connection to database = 1000 • Set Minimum time in microseconds to sleep after each request =0 • Set Maximum time in microseconds to sleep after each request =0
  • 4. Tables structure CREATE TABLE test_latin ( id int(10) unsigned NOT NULL, k int(10) unsigned NOT NULL DEFAULT '0', c char(120) NOT NULL DEFAULT '', pad char(60) NOT NULL DEFAULT '', PRIMARY KEY (id), KEY k (k) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 CREATE TABLE test_utf8 ( id int(10) unsigned NOT NULL, k int(10) unsigned NOT NULL DEFAULT '0', c char(120) NOT NULL DEFAULT '', pad char(60) NOT NULL DEFAULT '', PRIMARY KEY (id), KEY k (k) ) ENGINE=InnoDB DEFAULT CHARSET=utf8
  • 5. Create testing data scripts DROP PROCEDURE IF EXISTS insert_data_english; DELIMITER // CREATE PROCEDURE insert_data_english() BEGIN DECLARE vCount bigint(12) DEFAULT 1; DECLARE vK bigint(12) DEFAULT 1; DECLARE vbuyerName varchar(128) DEFAULT '0bzhonglizhongli'; DECLARE vSellerName varchar(128) DEFAULT '0szhonglizhongli'; SET AUTOCOMMIT=0; WHILE vCount<=1000000 DO INSERT INTO test_latin(id,k,c,pad) VALUES(vCount,vK,vSellerName,vbuyerName); INSERT INTO test_utf8(id,k,c,pad) VALUES(vCount,vK,vSellerName,vbuyerName); set vCount=vCount+1; IF MOD(vCount,5000)=0 THEN set vK=vK+1; set vbuyerName=concat(vCount,'bzhonglizhongli'); set vSellerName=concat(vCount,'szhonglizhongli'); COMMIT; END IF; END WHILE; COMMIT; END; // DELIMITER ;
  • 6. Result --using English characters Name latin1 utf8 Concurrent Transactions:141.17 per sec Transactions:96.88 per sec threads=8 read/write requests:2682.26 per sec. read/write requests:1840.80 per sec total time:3.5418s total time:5.1608s Concurrent Transactions:180.04 per sec Transactions:169.45 per sec threads=16 read/write requests:3420.82 per sec read/write requests:3219.54 per sec total time:2.7771s total time:2.9507s
  • 11. Result --using Chinese characters Name latin1 utf8 Concurrent Transactions:177.59 per sec Transactions:115.20 per sec threads=8 read/write requests:3374.16 per sec read/write requests:2188.76 per sec total time:2.8155s total time:4.3404s Concurrent Transactions:160.13 per sec Transactions:123.72 per sec threads=16 read/write requests:3042.41 per sec read/write requests:2350.69 per sec total time:3.1225s total time:4.0414s