SlideShare a Scribd company logo
The VP R&D Open Seminar




     MySQL Crash Course
    From basics to experts
           mokplan@gmail.com
  http://top-performance.blogspot.com
The VP R&D Open Seminar




WHY WE CHOSE MYSQL?


   http://top-performance.blogspot.com
Who is Using MySQL?




3
    http://top-performance.blogspot.com
Who is Behind MySQL




http://top-performance.blogspot.com
What MySQL is Made of?




5
                              http://top-performance.blogspot.com
    http://dev.mysql.com/tech-resources/articles/mysql_5.0_psea1.html
MySQL Limitations




    50-150M Records/Table
    50-5000 SELECT Statements/Second

6
         http://top-performance.blogspot.com
Why Do I Care?
    From 0 to 100 (US mass adaptation)
      Phone:            100 yrs
      Radio:            40 yrs
      TV:               30 yrs
      Mobile:           20 yrs
      Internet:         10 yrs
      Facebook:         2 yrs



7
                http://top-performance.blogspot.com
100K New Users/Week




8
    http://top-performance.blogspot.com
The VP R&D Open Seminar




WHAT MYSQL IS MADE OF?


   http://top-performance.blogspot.com
MySQL Structure
Daemon
/var/lib/mysql
  ibdata1
  ib_logfile0, Ib_logfile1
  /mysql
  /database
  /performance_schema
/etc/my.cnf


       http://top-performance.blogspot.com
What to Install
wget mysql_package
yum –y localinstall mysql_package

The Packages:
  Devel+Client+Server
  Relevant platform (x86/x64)
  Relevant operating system




       http://top-performance.blogspot.com
MySQL Installation




http://top-performance.blogspot.com
The VP R&D Open Seminar




DATABASE LOGICAL DESIGN
(OR ERD)

   http://top-performance.blogspot.com
Instances, Schemas and inside information




      http://top-performance.blogspot.com
1:Many




schoolId:                        schoolId:
Primary Key                      Foreign Key


http://top-performance.blogspot.com
Many:Many




?:                                       ?:
Primary Key                              Foreign Key


        http://top-performance.blogspot.com
Many:Many in Practice




testId:             testId,               studentId:
Primary Key         studentId:            Primary Key
                    Foreign Key

        http://top-performance.blogspot.com
Design a Student Information System ERD




      http://top-performance.blogspot.com
The VP R&D Open Seminar




FROM ERD TO A DATABASE


   http://top-performance.blogspot.com
Connect to the Database




http://top-performance.blogspot.com
Create a Schema/Database




http://top-performance.blogspot.com
Create a Table




http://top-performance.blogspot.com
Implement the a Student Information System ERD




       http://top-performance.blogspot.com
The VP R&D Open Seminar




SQL: DDL


    http://top-performance.blogspot.com
Databases Manipulation
SHOW DATABASES;
CREATE DATABASE mydb;
DROP DATABASE mydb;
USE mydb;




     http://top-performance.blogspot.com
Tables Manipulation
SHOW TABLES;
CREATE TABLE users (
id int,
INDEX users_id (id)
);
DROP TABLE users;
ALTER TABLE users ADD INDEX IX_id (id);
ALTER TABLE users DROP INDEX IX_id;


      http://top-performance.blogspot.com
The VP R&D Open Seminar




SQL: DML


   http://top-performance.blogspot.com
SELECT
SELECT table.field, table.*
FROM        table
WHERE table.field = 123
ORDER BY field1, field2 DESC




      http://top-performance.blogspot.com
SELECT + Join
SELECT     c.*, u.*
FROM       classes c
  INNER JOIN users u
  ON c.teacherId = u.id




      http://top-performance.blogspot.com
LEFT JOIN




http://top-performance.blogspot.com
GROUP BY
SELECT          gender, count(id)
FROM            users
WHERE       gender = ‘M’
GROUP BY        gender
HAVING          count(id) > 10




     http://top-performance.blogspot.com
UNION
SELECT      id
FROM        users
WHERE       gender = ‘M’
UNION ALL
SELECT      id
FROM        users
WHERE       gender = ‘F’
ORDER BY    id;

     http://top-performance.blogspot.com
UPDATE
UPDATE      users
SET         gender = ‘M’
WHERE       gender IS NULL;




     http://top-performance.blogspot.com
INSERT
INSERT INTO        users (gender)
VALUES      (‘M’);

INSERT INTO         users (gender)
SELECT              gender
FROM                users
WHERE               gender = ‘M’;


       http://top-performance.blogspot.com
DELETE
DELETE
FROM       users
WHERE      gender = ‘M’;




    http://top-performance.blogspot.com
The VP R&D Open Seminar




MySQL Authentication and Authorization

SECURITY


         http://top-performance.blogspot.com
Root User
First Time
  mysqladmin -u root password NEWPASSWORD
Nth Time
  mysqladmin -u root -p'oldpassword' password
  newpass
How to enter
  Mysql –uuser_name –ppassword –D
  database_name
  -h host_name/ip -A

       http://top-performance.blogspot.com
Users Table
mysql> SELECT * FROM mysql.user limit 1G
*************************** 1. row ***************************
Host: localhost
User: root
Password: *4FB5C598BC3FF56E262F863A715F8CB2976A9C69
Select_priv: Y
Insert_priv: Y
Update_priv: Y
Delete_priv: Y
Create_priv: Y
Drop_priv: Y
….
1 row in set (0.00 sec)


          http://top-performance.blogspot.com
Create a Users and Provide Permissions
-- Create a user w/ password
CREATE USER 'readonly'@'%' IDENTIFIED BY
‘sakexkas';
-- Grant Permissions
GRANT select ON my_db.* to 'readonly'@'%';
GRANT ALL PRIVILEGES ON *.* to
‘master_user’@’%’ WITH GRANT OPTION;
FLUSH PRIVILEGES;

-- Beware of too complex passwords


       http://top-performance.blogspot.com
The VP R&D Open Seminar




MYSQL AND LINUX ISSUES


    http://top-performance.blogspot.com
Built in Linux Security Measures
IP TABLES
   sudo /etc/init.d/iptables stop
   sudo yum –y remove iptables
   Configure the relevant rules
SELinux
   sudo echo 0 > /selinux/enforce
   vi /etc/selinux/config: SELINUX=enforcing  SELINUX=disabled
Files Limit (Table Partitioning)
   /etc/security/limits.conf
      mysql soft nofile 8192
      mysql hard nofile 8192
   my.cnf:
      open_files_limit = 8192



             http://top-performance.blogspot.com
Disk Resizing
http://top-
performance.blogspot.com/2012/02/do-you-
need-more-disk-space-for-mysql.html




      http://top-performance.blogspot.com
Create a Master/Slave configuration




     http://top-performance.blogspot.com
The VP R&D Open Seminar




HIGH AVAILABILITY
ARCHITECTURES

    http://top-performance.blogspot.com
Master/Slave




http://top-performance.blogspot.com
Master/Master




          ?
http://top-performance.blogspot.com
Show Status (1)
mysql> show slave statusG
*************************** 1. row ***************************
Slave_IO_State: Waiting for master to send event
Master_Host: 10.12.12.167
Master_User: repl
Master_Port: 3306
Connect_Retry: 60

Master_Log_File: master.000094
Read_Master_Log_Pos: 167250867
Relay_Log_File: mysqld-relay-bin.000137
Relay_Log_Pos: 167251010

Relay_Master_Log_File: master.000094
Slave_IO_Running: Yes
Slave_SQL_Running: Yes
Replicate_Do_DB:
Replicate_Ignore_DB:
Replicate_Do_Table:
Replicate_Ignore_Table:
Replicate_Wild_Do_Table:
Replicate_Wild_Ignore_Table: mysql.%,information_schema.%




                             http://top-performance.blogspot.com
Show Status (2)
Last_Errno: 0
Last_Error:
Skip_Counter: 0

Exec_Master_Log_Pos: 167250867
Relay_Log_Space: 167251310
Until_Condition: None
Until_Log_File:
Until_Log_Pos: 0
Master_SSL_Allowed: No
Master_SSL_CA_File:
Master_SSL_CA_Path:
Master_SSL_Cert:
Master_SSL_Cipher:
Master_SSL_Key:
Seconds_Behind_Master: 0
Master_SSL_Verify_Server_Cert: No
Last_IO_Errno: 0
Last_IO_Error:
Last_SQL_Errno: 0
Last_SQL_Error:
Replicate_Ignore_Server_Ids:
Master_Server_Id: 1
1 row in set (0.02 sec)




                           http://top-performance.blogspot.com
Skip
DON’T DO THAT unless you have to!
The Process:
 STOP SLAVE;
 SET GLOBAL SQL_SLAVE_SKIP_COUNTER =
 1;
 START SLAVE;
 SHOW SLAVE STATUSG




     http://top-performance.blogspot.com
How to Implement?
Stop a Master and record position
Copy a Master (instance/disk) to a Slave
Start the Master
Change slave server-id
SET MASTER HOST …
START SLAVE
Verify
Or…
http://top-performance.blogspot.co.il/2012/03/how-to-
setup-mysql-replication-in-11.html


        http://top-performance.blogspot.com
Create a Master/Slave configuration




     http://top-performance.blogspot.com
The VP R&D Open Seminar




SCALE-ABLE ARCHITECTURES


   http://top-performance.blogspot.com
Do You Remember?




53
     http://top-performance.blogspot.com
Strategy A: Sharding




54
     http://top-performance.blogspot.com
Strategy B: In Memory Databases




55
       http://top-performance.blogspot.com
700 Inserts/Sec



                                             In Memory Engine

                                             3000 Inserts/Sec




 Amazon AWS

 Standard                                    InnoDB Engine

 Large Instance                              700 Inserts/Sec




56
                  http://top-performance.blogspot.com
IMDB - Implementation




57
     http://top-performance.blogspot.com
Lessons
     Cache:             MySQL IMDB
     HA:                MySQL Replication
     Persistence:       Periodic 5min Batch
     Scalability:       Sharding

     4 Bill Req/Day using 25 machines (2000/s)




58
           http://top-performance.blogspot.com
Strategy C: MapReduce




59
     http://top-performance.blogspot.com
Strategy D: NoSQL
      insert
      get
        multiget
      remove
      truncate




                                   <Key, Value>
 http://wiki.apache.org/cassandra/API




60
                           http://top-performance.blogspot.com
When Should I Choose NoSQL?

     Eventually Consistent
     Document Store
     Key Value




                                http://guyharrison.squarespace.com/blog/tag/nosql




61
           http://top-performance.blogspot.com
Sharding Again




62
     http://top-performance.blogspot.com
Vertical Sharding




63
     http://top-performance.blogspot.com
Horizontal Sharding
     Static Hashing
     Complex growth                              Mod 10 = 0

                                                 Mod 10 = 1
     Simple
                                                 Mod 10 = 2

                                                 Mod 10 = 3

                                                 Mod 10 = 4

                                                 Mod 10 = 5

                                                 Mod 10 = 6

                                                 Mod 10 = 7

                                                 Mod 10 = 8

                                                 Mod 10 = 9



64
           http://top-performance.blogspot.com
Horizontal Sharding
     Key locations are defined in a directory
     Simple growth
     Directory is SPOF




65
            http://top-performance.blogspot.com
Horizontal Sharding
      Static Hashing with Directory Mapping
       Simple Growth
       Small Directory still SPOF




     Mod 1000 = 4


66
              http://top-performance.blogspot.com
Horizontal Sharding
     Each key signed by DB#
     generated on creation
     Simple growth
     New key generation is SPOF




67
           http://top-performance.blogspot.com
Limitations: Reporting




68
     http://top-performance.blogspot.com
Best Practices
 $connection =
   new_db_connection("customer://1234");
 $statement =
      $connection->prepare(
           $sql_statement,
           $params
      );
 $result =
      $statement->execute();




69
         http://top-performance.blogspot.com
The VP R&D Open Seminar




BACKUP AND RESTORE


   http://top-performance.blogspot.com
Options
mysqldump
Physical disk copy
3rd Party solution: XtraDB, amanda




       http://top-performance.blogspot.com
Backup Your Server




http://top-performance.blogspot.com
The VP R&D Open Seminar




HANDLING PROBLEMS


   http://top-performance.blogspot.com
Error Log
   Get the Location:
[/]$ sudo more /etc/my.cnf | grep -i error
log-error=/var/lib/mysql/log.err
   Look for issues
[/]$ sudo tail -n 20 /var/lib/mysql/log.err
121025 13:24:23 InnoDB: Initializing buffer pool, size = 128.0M
121025 13:24:23 InnoDB: Completed initialization of buffer pool
121025 13:24:24 InnoDB: highest supported file format is
  Barracuda.
121025 13:24:25 InnoDB: Waiting for the background threads to
  start



            http://top-performance.blogspot.com
The VP R&D Open Seminar




DEVOPS MYSQL


   http://top-performance.blogspot.com
-e
mysql
-uuser
-ppassword
-Ddatabase
-hserver
-e”SELECT * FROM table;”




      http://top-performance.blogspot.com
Import Data
mysql
-uuser
-ppassword
-Ddatabase
-hserver
< /dir/to/filename.sql




       http://top-performance.blogspot.com
Export Data
mysqldump
-uuser
-ppassword
--databases database_name
--single-transaction --master-data=1 >
/path/to/backup/file.sql




       http://top-performance.blogspot.com
The VP R&D Open Seminar




MYSQL TUNING


   http://top-performance.blogspot.com
my.cnf




http://top-performance.blogspot.com
mysqltuner




http://top-performance.blogspot.com
Slow Query
log-slow-queries = /var/log/mysql/mysql-
slow.log
long_query_time = 1
log-queries-not-using-indexes




       http://top-performance.blogspot.com
explain
mysql> explain SELECT COUNT(*), post_type FROM wp_posts GROUP
BY post_type;
+--+-------------+--------+-----+-------------+-----------+-------+----+----+-----------+
|id| select_type |table   | type|possible_keys|key        |key_len|ref |rows| Extra
+--+-------------+--------+-----+-------------+-----------+-------+----+----+-----------+
|1 | SIMPLE      |wp_posts|index|NULL         |type_status| 140   |NULL|693 | Using index
+--+-------------+--------+-----+-------------+-----------+-------+----+----+-----------+
1 row in set (0.02 sec)




                 http://top-performance.blogspot.com
Profiling
http://top-
performance.blogspot.co.il/2011/07/mysql-
statement-profiling.html




      http://top-performance.blogspot.com
RAM Usage Optimization
     Preferred: SizeOf(database) < SizeOf(RAM)
     innodb_buffer_pool_size
       50-70% of your RAM




85
           http://top-performance.blogspot.com
Do We Utilize the Cache?
     SHOW STATUS LIKE 'Qcache%';

 Qcache_free_blocks        718
 Qcache_free_memory        13004008
 Qcache_hits               780759
 Qcache_inserts            56292
 Qcache_lowmem_prunes      0
 Qcache_not_cached         3711
 Qcache_queries_in_cache   1715
 Qcache_total_blocks       4344


86
           http://top-performance.blogspot.com
Cache Queries
     query_cache_type = 1
     query_cache_limit = 1M
     query_cache_size = 16M




87
           http://top-performance.blogspot.com
Buffer Optimization
     key_reads/key_read_requests < 0.01
     If not
       Increase Key Buffer




88
            http://top-performance.blogspot.com
CPU Optimization
     thread_concurrency = 2 X #(CPU Cores)




89
           http://top-performance.blogspot.com
Tune Your Server




http://top-performance.blogspot.com
Summary




http://top-performance.blogspot.com
What happens when mysql fails to start…
Create my.cnf
   touch /etc/my.cnf
Create the error log
   vi /etc/my.cnf
   [mysqld]
   log-error=/var/lib/mysql/log.err
If the my.cnf is already configured
   more /etc/my.cnf | grep –i error
Restart mysql
Find the error
   tail –n 50 /var/lib/mysql/log.err
In this case we kill all the mysql proceses
   ps –aux | grep –i mysql
   sudo kill process_id



           http://top-performance.blogspot.com
The Bottom Line: Grow ∞



 Thank you!
 and Keep Performing!

     Moshe Kaplan




93
          http://top-performance.blogspot.com
Ad

More Related Content

What's hot (20)

Creating a full stack web app with python, npm, webpack and react
Creating a full stack web app with python, npm, webpack and reactCreating a full stack web app with python, npm, webpack and react
Creating a full stack web app with python, npm, webpack and react
Angela Kristine Juvet Branaes
 
JavaDo#09 Spring boot入門ハンズオン
JavaDo#09 Spring boot入門ハンズオンJavaDo#09 Spring boot入門ハンズオン
JavaDo#09 Spring boot入門ハンズオン
haruki ueno
 
CodeIgniter PHP MVC Framework
CodeIgniter PHP MVC FrameworkCodeIgniter PHP MVC Framework
CodeIgniter PHP MVC Framework
Bo-Yi Wu
 
Take Command of WordPress With WP-CLI
Take Command of WordPress With WP-CLITake Command of WordPress With WP-CLI
Take Command of WordPress With WP-CLI
Diana Thompson
 
PHP SA 2014 - Releasing Your Open Source Project
PHP SA 2014 - Releasing Your Open Source ProjectPHP SA 2014 - Releasing Your Open Source Project
PHP SA 2014 - Releasing Your Open Source Project
xsist10
 
Developers, Be a Bada$$ with WP-CLI
Developers, Be a Bada$$ with WP-CLIDevelopers, Be a Bada$$ with WP-CLI
Developers, Be a Bada$$ with WP-CLI
WP Engine
 
Martin Aspeli Extending And Customising Plone 3
Martin Aspeli   Extending And Customising Plone 3Martin Aspeli   Extending And Customising Plone 3
Martin Aspeli Extending And Customising Plone 3
Vincenzo Barone
 
BaláZs Ree Introduction To Kss, Kinetic Style Sheets
BaláZs Ree   Introduction To Kss, Kinetic Style SheetsBaláZs Ree   Introduction To Kss, Kinetic Style Sheets
BaláZs Ree Introduction To Kss, Kinetic Style Sheets
Vincenzo Barone
 
webcomponents (Jfokus 2015)
webcomponents (Jfokus 2015)webcomponents (Jfokus 2015)
webcomponents (Jfokus 2015)
Hendrik Ebbers
 
Node JS Express : Steps to Create Restful Web App
Node JS Express : Steps to Create Restful Web AppNode JS Express : Steps to Create Restful Web App
Node JS Express : Steps to Create Restful Web App
Edureka!
 
BPMS1
BPMS1BPMS1
BPMS1
tutorialsruby
 
Spring boot入門ハンズオン第二回
Spring boot入門ハンズオン第二回Spring boot入門ハンズオン第二回
Spring boot入門ハンズオン第二回
haruki ueno
 
Browser Caching and You: A Love Story
Browser Caching and You: A Love StoryBrowser Caching and You: A Love Story
Browser Caching and You: A Love Story
Mark Nottingham
 
Enterprise Hosting
Enterprise HostingEnterprise Hosting
Enterprise Hosting
Avarteq
 
WPDay Bologna 2013
WPDay Bologna 2013WPDay Bologna 2013
WPDay Bologna 2013
Danilo Ercoli
 
Godefroid Chapelle Ajax With Plone 3 Kss Development Patterns
Godefroid Chapelle   Ajax With Plone 3   Kss Development PatternsGodefroid Chapelle   Ajax With Plone 3   Kss Development Patterns
Godefroid Chapelle Ajax With Plone 3 Kss Development Patterns
Vincenzo Barone
 
Deployment Best Practices on WebLogic Server (DOAG IMC Summit 2013)
Deployment Best Practices on WebLogic Server (DOAG IMC Summit 2013)Deployment Best Practices on WebLogic Server (DOAG IMC Summit 2013)
Deployment Best Practices on WebLogic Server (DOAG IMC Summit 2013)
Andreas Koop
 
CakePHP - Admin Acl Controlled
CakePHP - Admin Acl ControlledCakePHP - Admin Acl Controlled
CakePHP - Admin Acl Controlled
Luís Fred
 
Spring Booted, But... @JCConf 16', Taiwan
Spring Booted, But... @JCConf 16', TaiwanSpring Booted, But... @JCConf 16', Taiwan
Spring Booted, But... @JCConf 16', Taiwan
Pei-Tang Huang
 
REST APIs with Spring
REST APIs with SpringREST APIs with Spring
REST APIs with Spring
Joshua Long
 
Creating a full stack web app with python, npm, webpack and react
Creating a full stack web app with python, npm, webpack and reactCreating a full stack web app with python, npm, webpack and react
Creating a full stack web app with python, npm, webpack and react
Angela Kristine Juvet Branaes
 
JavaDo#09 Spring boot入門ハンズオン
JavaDo#09 Spring boot入門ハンズオンJavaDo#09 Spring boot入門ハンズオン
JavaDo#09 Spring boot入門ハンズオン
haruki ueno
 
CodeIgniter PHP MVC Framework
CodeIgniter PHP MVC FrameworkCodeIgniter PHP MVC Framework
CodeIgniter PHP MVC Framework
Bo-Yi Wu
 
Take Command of WordPress With WP-CLI
Take Command of WordPress With WP-CLITake Command of WordPress With WP-CLI
Take Command of WordPress With WP-CLI
Diana Thompson
 
PHP SA 2014 - Releasing Your Open Source Project
PHP SA 2014 - Releasing Your Open Source ProjectPHP SA 2014 - Releasing Your Open Source Project
PHP SA 2014 - Releasing Your Open Source Project
xsist10
 
Developers, Be a Bada$$ with WP-CLI
Developers, Be a Bada$$ with WP-CLIDevelopers, Be a Bada$$ with WP-CLI
Developers, Be a Bada$$ with WP-CLI
WP Engine
 
Martin Aspeli Extending And Customising Plone 3
Martin Aspeli   Extending And Customising Plone 3Martin Aspeli   Extending And Customising Plone 3
Martin Aspeli Extending And Customising Plone 3
Vincenzo Barone
 
BaláZs Ree Introduction To Kss, Kinetic Style Sheets
BaláZs Ree   Introduction To Kss, Kinetic Style SheetsBaláZs Ree   Introduction To Kss, Kinetic Style Sheets
BaláZs Ree Introduction To Kss, Kinetic Style Sheets
Vincenzo Barone
 
webcomponents (Jfokus 2015)
webcomponents (Jfokus 2015)webcomponents (Jfokus 2015)
webcomponents (Jfokus 2015)
Hendrik Ebbers
 
Node JS Express : Steps to Create Restful Web App
Node JS Express : Steps to Create Restful Web AppNode JS Express : Steps to Create Restful Web App
Node JS Express : Steps to Create Restful Web App
Edureka!
 
Spring boot入門ハンズオン第二回
Spring boot入門ハンズオン第二回Spring boot入門ハンズオン第二回
Spring boot入門ハンズオン第二回
haruki ueno
 
Browser Caching and You: A Love Story
Browser Caching and You: A Love StoryBrowser Caching and You: A Love Story
Browser Caching and You: A Love Story
Mark Nottingham
 
Enterprise Hosting
Enterprise HostingEnterprise Hosting
Enterprise Hosting
Avarteq
 
Godefroid Chapelle Ajax With Plone 3 Kss Development Patterns
Godefroid Chapelle   Ajax With Plone 3   Kss Development PatternsGodefroid Chapelle   Ajax With Plone 3   Kss Development Patterns
Godefroid Chapelle Ajax With Plone 3 Kss Development Patterns
Vincenzo Barone
 
Deployment Best Practices on WebLogic Server (DOAG IMC Summit 2013)
Deployment Best Practices on WebLogic Server (DOAG IMC Summit 2013)Deployment Best Practices on WebLogic Server (DOAG IMC Summit 2013)
Deployment Best Practices on WebLogic Server (DOAG IMC Summit 2013)
Andreas Koop
 
CakePHP - Admin Acl Controlled
CakePHP - Admin Acl ControlledCakePHP - Admin Acl Controlled
CakePHP - Admin Acl Controlled
Luís Fred
 
Spring Booted, But... @JCConf 16', Taiwan
Spring Booted, But... @JCConf 16', TaiwanSpring Booted, But... @JCConf 16', Taiwan
Spring Booted, But... @JCConf 16', Taiwan
Pei-Tang Huang
 
REST APIs with Spring
REST APIs with SpringREST APIs with Spring
REST APIs with Spring
Joshua Long
 

Viewers also liked (13)

Simplyway
Simplyway Simplyway
Simplyway
vilma martins da silva
 
Progetto BE@CTIVE
Progetto BE@CTIVEProgetto BE@CTIVE
Progetto BE@CTIVE
Rosamaria Colombara
 
El silencio de san mamés
El silencio de san mamésEl silencio de san mamés
El silencio de san mamés
Lola Arroyo
 
[Russian 9 02_16] cook&talk_idea
[Russian 9 02_16] cook&talk_idea[Russian 9 02_16] cook&talk_idea
[Russian 9 02_16] cook&talk_idea
Yulia Razumova
 
- العلاقات - رأس برأس
 - العلاقات - رأس برأس - العلاقات - رأس برأس
- العلاقات - رأس برأس
Marwa Mohyee El Din
 
El penalti en dos tiempos de samuel lamarca
El penalti en dos tiempos de samuel lamarcaEl penalti en dos tiempos de samuel lamarca
El penalti en dos tiempos de samuel lamarca
Lola Arroyo
 
Photo contest 2011 communication campain
Photo contest 2011 communication campainPhoto contest 2011 communication campain
Photo contest 2011 communication campain
Yulia Razumova
 
IVANAREYNA_PORTFOLIO
IVANAREYNA_PORTFOLIOIVANAREYNA_PORTFOLIO
IVANAREYNA_PORTFOLIO
Ivana Reyna
 
As consequências da ascensão de donald trump ao poder nos estados unidos
As consequências da ascensão de donald trump ao poder nos estados unidosAs consequências da ascensão de donald trump ao poder nos estados unidos
As consequências da ascensão de donald trump ao poder nos estados unidos
Fernando Alcoforado
 
La jaula de los campos de sport
La jaula de los campos de sportLa jaula de los campos de sport
La jaula de los campos de sport
Lola Arroyo
 
Articulo javier programaciones
Articulo javier programacionesArticulo javier programaciones
Articulo javier programaciones
NataliaNPC
 
Pascua judia y cristiana
Pascua judia y cristianaPascua judia y cristiana
Pascua judia y cristiana
Miguel Palomino
 
El silencio de san mamés
El silencio de san mamésEl silencio de san mamés
El silencio de san mamés
Lola Arroyo
 
[Russian 9 02_16] cook&talk_idea
[Russian 9 02_16] cook&talk_idea[Russian 9 02_16] cook&talk_idea
[Russian 9 02_16] cook&talk_idea
Yulia Razumova
 
- العلاقات - رأس برأس
 - العلاقات - رأس برأس - العلاقات - رأس برأس
- العلاقات - رأس برأس
Marwa Mohyee El Din
 
El penalti en dos tiempos de samuel lamarca
El penalti en dos tiempos de samuel lamarcaEl penalti en dos tiempos de samuel lamarca
El penalti en dos tiempos de samuel lamarca
Lola Arroyo
 
Photo contest 2011 communication campain
Photo contest 2011 communication campainPhoto contest 2011 communication campain
Photo contest 2011 communication campain
Yulia Razumova
 
IVANAREYNA_PORTFOLIO
IVANAREYNA_PORTFOLIOIVANAREYNA_PORTFOLIO
IVANAREYNA_PORTFOLIO
Ivana Reyna
 
As consequências da ascensão de donald trump ao poder nos estados unidos
As consequências da ascensão de donald trump ao poder nos estados unidosAs consequências da ascensão de donald trump ao poder nos estados unidos
As consequências da ascensão de donald trump ao poder nos estados unidos
Fernando Alcoforado
 
La jaula de los campos de sport
La jaula de los campos de sportLa jaula de los campos de sport
La jaula de los campos de sport
Lola Arroyo
 
Articulo javier programaciones
Articulo javier programacionesArticulo javier programaciones
Articulo javier programaciones
NataliaNPC
 
Pascua judia y cristiana
Pascua judia y cristianaPascua judia y cristiana
Pascua judia y cristiana
Miguel Palomino
 
Ad

Similar to MySQL crash course by moshe kaplan (20)

Web Systems Architecture by Moshe Kaplan
Web Systems Architecture by Moshe KaplanWeb Systems Architecture by Moshe Kaplan
Web Systems Architecture by Moshe Kaplan
Moshe Kaplan
 
Web systems architecture, Performance and More
Web systems architecture, Performance and MoreWeb systems architecture, Performance and More
Web systems architecture, Performance and More
Moshe Kaplan
 
Big Data Seminar: Analytics, Hadoop, Map Reduce, Mongo and other great stuff
Big Data Seminar: Analytics, Hadoop, Map Reduce, Mongo and other great stuffBig Data Seminar: Analytics, Hadoop, Map Reduce, Mongo and other great stuff
Big Data Seminar: Analytics, Hadoop, Map Reduce, Mongo and other great stuff
Moshe Kaplan
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDB
Moshe Kaplan
 
Testing Like a Pro - Chef Infrastructure Testing
Testing Like a Pro - Chef Infrastructure TestingTesting Like a Pro - Chef Infrastructure Testing
Testing Like a Pro - Chef Infrastructure Testing
Tim Smith
 
STSADM Automating SharePoint Administration - Tech Ed South East Asia 2008 wi...
STSADM Automating SharePoint Administration - Tech Ed South East Asia 2008 wi...STSADM Automating SharePoint Administration - Tech Ed South East Asia 2008 wi...
STSADM Automating SharePoint Administration - Tech Ed South East Asia 2008 wi...
Joel Oleson
 
Stored procedures by thanveer danish melayi
Stored procedures by thanveer danish melayiStored procedures by thanveer danish melayi
Stored procedures by thanveer danish melayi
Muhammed Thanveer M
 
Brief introduction into SQL injection attack scenarios
Brief introduction into SQL injection attack scenariosBrief introduction into SQL injection attack scenarios
Brief introduction into SQL injection attack scenarios
Payampardaz
 
How to Contribute Code to MySQL?
How to Contribute Code to MySQL?How to Contribute Code to MySQL?
How to Contribute Code to MySQL?
Thava Alagu
 
Webinar - Setup MySQL with Puppet
Webinar - Setup MySQL with PuppetWebinar - Setup MySQL with Puppet
Webinar - Setup MySQL with Puppet
OlinData
 
Djangoアプリのデプロイに関するプラクティス / Deploy django application
Djangoアプリのデプロイに関するプラクティス / Deploy django applicationDjangoアプリのデプロイに関するプラクティス / Deploy django application
Djangoアプリのデプロイに関するプラクティス / Deploy django application
Masashi Shibata
 
Raj mysql
Raj mysqlRaj mysql
Raj mysql
firstplanet
 
2016 aRcTicCON - Hacking SQL Server on Scale with PowerShell (Slide Updates)
2016 aRcTicCON - Hacking SQL Server on Scale with PowerShell (Slide Updates)2016 aRcTicCON - Hacking SQL Server on Scale with PowerShell (Slide Updates)
2016 aRcTicCON - Hacking SQL Server on Scale with PowerShell (Slide Updates)
Scott Sutherland
 
2017 OWASP SanFran March Meetup - Hacking SQL Server on Scale with PowerShell
2017 OWASP SanFran March Meetup - Hacking SQL Server on Scale with PowerShell2017 OWASP SanFran March Meetup - Hacking SQL Server on Scale with PowerShell
2017 OWASP SanFran March Meetup - Hacking SQL Server on Scale with PowerShell
Scott Sutherland
 
SQLMAP Tool Usage - A Heads Up
SQLMAP Tool Usage - A  Heads UpSQLMAP Tool Usage - A  Heads Up
SQLMAP Tool Usage - A Heads Up
Mindfire Solutions
 
Behavior Driven Development and Automation Testing Using Cucumber
Behavior Driven Development and Automation Testing Using CucumberBehavior Driven Development and Automation Testing Using Cucumber
Behavior Driven Development and Automation Testing Using Cucumber
KMS Technology
 
MySQL Best Practices - OTN LAD Tour
MySQL Best Practices - OTN LAD TourMySQL Best Practices - OTN LAD Tour
MySQL Best Practices - OTN LAD Tour
Ronald Bradford
 
MySQL 8.0.19 - New Features Summary
MySQL 8.0.19 - New Features SummaryMySQL 8.0.19 - New Features Summary
MySQL 8.0.19 - New Features Summary
Olivier DASINI
 
10 things every developer should know about their database to run word press ...
10 things every developer should know about their database to run word press ...10 things every developer should know about their database to run word press ...
10 things every developer should know about their database to run word press ...
Otto Kekäläinen
 
Applying profilers to my sql (fosdem 2017)
Applying profilers to my sql (fosdem 2017)Applying profilers to my sql (fosdem 2017)
Applying profilers to my sql (fosdem 2017)
Valeriy Kravchuk
 
Web Systems Architecture by Moshe Kaplan
Web Systems Architecture by Moshe KaplanWeb Systems Architecture by Moshe Kaplan
Web Systems Architecture by Moshe Kaplan
Moshe Kaplan
 
Web systems architecture, Performance and More
Web systems architecture, Performance and MoreWeb systems architecture, Performance and More
Web systems architecture, Performance and More
Moshe Kaplan
 
Big Data Seminar: Analytics, Hadoop, Map Reduce, Mongo and other great stuff
Big Data Seminar: Analytics, Hadoop, Map Reduce, Mongo and other great stuffBig Data Seminar: Analytics, Hadoop, Map Reduce, Mongo and other great stuff
Big Data Seminar: Analytics, Hadoop, Map Reduce, Mongo and other great stuff
Moshe Kaplan
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDB
Moshe Kaplan
 
Testing Like a Pro - Chef Infrastructure Testing
Testing Like a Pro - Chef Infrastructure TestingTesting Like a Pro - Chef Infrastructure Testing
Testing Like a Pro - Chef Infrastructure Testing
Tim Smith
 
STSADM Automating SharePoint Administration - Tech Ed South East Asia 2008 wi...
STSADM Automating SharePoint Administration - Tech Ed South East Asia 2008 wi...STSADM Automating SharePoint Administration - Tech Ed South East Asia 2008 wi...
STSADM Automating SharePoint Administration - Tech Ed South East Asia 2008 wi...
Joel Oleson
 
Stored procedures by thanveer danish melayi
Stored procedures by thanveer danish melayiStored procedures by thanveer danish melayi
Stored procedures by thanveer danish melayi
Muhammed Thanveer M
 
Brief introduction into SQL injection attack scenarios
Brief introduction into SQL injection attack scenariosBrief introduction into SQL injection attack scenarios
Brief introduction into SQL injection attack scenarios
Payampardaz
 
How to Contribute Code to MySQL?
How to Contribute Code to MySQL?How to Contribute Code to MySQL?
How to Contribute Code to MySQL?
Thava Alagu
 
Webinar - Setup MySQL with Puppet
Webinar - Setup MySQL with PuppetWebinar - Setup MySQL with Puppet
Webinar - Setup MySQL with Puppet
OlinData
 
Djangoアプリのデプロイに関するプラクティス / Deploy django application
Djangoアプリのデプロイに関するプラクティス / Deploy django applicationDjangoアプリのデプロイに関するプラクティス / Deploy django application
Djangoアプリのデプロイに関するプラクティス / Deploy django application
Masashi Shibata
 
2016 aRcTicCON - Hacking SQL Server on Scale with PowerShell (Slide Updates)
2016 aRcTicCON - Hacking SQL Server on Scale with PowerShell (Slide Updates)2016 aRcTicCON - Hacking SQL Server on Scale with PowerShell (Slide Updates)
2016 aRcTicCON - Hacking SQL Server on Scale with PowerShell (Slide Updates)
Scott Sutherland
 
2017 OWASP SanFran March Meetup - Hacking SQL Server on Scale with PowerShell
2017 OWASP SanFran March Meetup - Hacking SQL Server on Scale with PowerShell2017 OWASP SanFran March Meetup - Hacking SQL Server on Scale with PowerShell
2017 OWASP SanFran March Meetup - Hacking SQL Server on Scale with PowerShell
Scott Sutherland
 
SQLMAP Tool Usage - A Heads Up
SQLMAP Tool Usage - A  Heads UpSQLMAP Tool Usage - A  Heads Up
SQLMAP Tool Usage - A Heads Up
Mindfire Solutions
 
Behavior Driven Development and Automation Testing Using Cucumber
Behavior Driven Development and Automation Testing Using CucumberBehavior Driven Development and Automation Testing Using Cucumber
Behavior Driven Development and Automation Testing Using Cucumber
KMS Technology
 
MySQL Best Practices - OTN LAD Tour
MySQL Best Practices - OTN LAD TourMySQL Best Practices - OTN LAD Tour
MySQL Best Practices - OTN LAD Tour
Ronald Bradford
 
MySQL 8.0.19 - New Features Summary
MySQL 8.0.19 - New Features SummaryMySQL 8.0.19 - New Features Summary
MySQL 8.0.19 - New Features Summary
Olivier DASINI
 
10 things every developer should know about their database to run word press ...
10 things every developer should know about their database to run word press ...10 things every developer should know about their database to run word press ...
10 things every developer should know about their database to run word press ...
Otto Kekäläinen
 
Applying profilers to my sql (fosdem 2017)
Applying profilers to my sql (fosdem 2017)Applying profilers to my sql (fosdem 2017)
Applying profilers to my sql (fosdem 2017)
Valeriy Kravchuk
 
Ad

More from Moshe Kaplan (20)

Spark and C Integration
Spark and C IntegrationSpark and C Integration
Spark and C Integration
Moshe Kaplan
 
Introduction to Big Data
Introduction to Big DataIntroduction to Big Data
Introduction to Big Data
Moshe Kaplan
 
Introduciton to Python
Introduciton to PythonIntroduciton to Python
Introduciton to Python
Moshe Kaplan
 
Creating Big Data: Methodology
Creating Big Data: MethodologyCreating Big Data: Methodology
Creating Big Data: Methodology
Moshe Kaplan
 
Git Tutorial
Git TutorialGit Tutorial
Git Tutorial
Moshe Kaplan
 
Redis training for java software engineers
Redis training for java software engineersRedis training for java software engineers
Redis training for java software engineers
Moshe Kaplan
 
MongoDB training for java software engineers
MongoDB training for java software engineersMongoDB training for java software engineers
MongoDB training for java software engineers
Moshe Kaplan
 
MongoDB from Basics to Scale
MongoDB from Basics to ScaleMongoDB from Basics to Scale
MongoDB from Basics to Scale
Moshe Kaplan
 
MongoDB Best Practices for Developers
MongoDB Best Practices for DevelopersMongoDB Best Practices for Developers
MongoDB Best Practices for Developers
Moshe Kaplan
 
The api economy
The api economyThe api economy
The api economy
Moshe Kaplan
 
Scale and Cloud Design Patterns
Scale and Cloud Design PatternsScale and Cloud Design Patterns
Scale and Cloud Design Patterns
Moshe Kaplan
 
Do Big Data and NoSQL Fit Your Needs?
Do Big Data and NoSQL Fit Your Needs?Do Big Data and NoSQL Fit Your Needs?
Do Big Data and NoSQL Fit Your Needs?
Moshe Kaplan
 
The VP R&D Open Seminar on Project Management, SCRUM, Agile and Continuous De...
The VP R&D Open Seminar on Project Management, SCRUM, Agile and Continuous De...The VP R&D Open Seminar on Project Management, SCRUM, Agile and Continuous De...
The VP R&D Open Seminar on Project Management, SCRUM, Agile and Continuous De...
Moshe Kaplan
 
MySQL Multi Master Replication
MySQL Multi Master ReplicationMySQL Multi Master Replication
MySQL Multi Master Replication
Moshe Kaplan
 
mongoDB Performance
mongoDB PerformancemongoDB Performance
mongoDB Performance
Moshe Kaplan
 
VP R&D Open Seminar: Caching
VP R&D Open Seminar: CachingVP R&D Open Seminar: Caching
VP R&D Open Seminar: Caching
Moshe Kaplan
 
Expert Days: The VP R&D Open Seminar: Project Management
Expert Days: The VP R&D Open Seminar: Project ManagementExpert Days: The VP R&D Open Seminar: Project Management
Expert Days: The VP R&D Open Seminar: Project Management
Moshe Kaplan
 
Expert Days 2011: The VP R&D Open Seminar: Systems Performance Seminar
Expert Days 2011: The VP R&D Open Seminar: Systems Performance Seminar Expert Days 2011: The VP R&D Open Seminar: Systems Performance Seminar
Expert Days 2011: The VP R&D Open Seminar: Systems Performance Seminar
Moshe Kaplan
 
Database2011 MySQL Sharding
Database2011 MySQL ShardingDatabase2011 MySQL Sharding
Database2011 MySQL Sharding
Moshe Kaplan
 
Cloud Computing Design Best Practices
Cloud Computing Design Best PracticesCloud Computing Design Best Practices
Cloud Computing Design Best Practices
Moshe Kaplan
 
Spark and C Integration
Spark and C IntegrationSpark and C Integration
Spark and C Integration
Moshe Kaplan
 
Introduction to Big Data
Introduction to Big DataIntroduction to Big Data
Introduction to Big Data
Moshe Kaplan
 
Introduciton to Python
Introduciton to PythonIntroduciton to Python
Introduciton to Python
Moshe Kaplan
 
Creating Big Data: Methodology
Creating Big Data: MethodologyCreating Big Data: Methodology
Creating Big Data: Methodology
Moshe Kaplan
 
Redis training for java software engineers
Redis training for java software engineersRedis training for java software engineers
Redis training for java software engineers
Moshe Kaplan
 
MongoDB training for java software engineers
MongoDB training for java software engineersMongoDB training for java software engineers
MongoDB training for java software engineers
Moshe Kaplan
 
MongoDB from Basics to Scale
MongoDB from Basics to ScaleMongoDB from Basics to Scale
MongoDB from Basics to Scale
Moshe Kaplan
 
MongoDB Best Practices for Developers
MongoDB Best Practices for DevelopersMongoDB Best Practices for Developers
MongoDB Best Practices for Developers
Moshe Kaplan
 
Scale and Cloud Design Patterns
Scale and Cloud Design PatternsScale and Cloud Design Patterns
Scale and Cloud Design Patterns
Moshe Kaplan
 
Do Big Data and NoSQL Fit Your Needs?
Do Big Data and NoSQL Fit Your Needs?Do Big Data and NoSQL Fit Your Needs?
Do Big Data and NoSQL Fit Your Needs?
Moshe Kaplan
 
The VP R&D Open Seminar on Project Management, SCRUM, Agile and Continuous De...
The VP R&D Open Seminar on Project Management, SCRUM, Agile and Continuous De...The VP R&D Open Seminar on Project Management, SCRUM, Agile and Continuous De...
The VP R&D Open Seminar on Project Management, SCRUM, Agile and Continuous De...
Moshe Kaplan
 
MySQL Multi Master Replication
MySQL Multi Master ReplicationMySQL Multi Master Replication
MySQL Multi Master Replication
Moshe Kaplan
 
mongoDB Performance
mongoDB PerformancemongoDB Performance
mongoDB Performance
Moshe Kaplan
 
VP R&D Open Seminar: Caching
VP R&D Open Seminar: CachingVP R&D Open Seminar: Caching
VP R&D Open Seminar: Caching
Moshe Kaplan
 
Expert Days: The VP R&D Open Seminar: Project Management
Expert Days: The VP R&D Open Seminar: Project ManagementExpert Days: The VP R&D Open Seminar: Project Management
Expert Days: The VP R&D Open Seminar: Project Management
Moshe Kaplan
 
Expert Days 2011: The VP R&D Open Seminar: Systems Performance Seminar
Expert Days 2011: The VP R&D Open Seminar: Systems Performance Seminar Expert Days 2011: The VP R&D Open Seminar: Systems Performance Seminar
Expert Days 2011: The VP R&D Open Seminar: Systems Performance Seminar
Moshe Kaplan
 
Database2011 MySQL Sharding
Database2011 MySQL ShardingDatabase2011 MySQL Sharding
Database2011 MySQL Sharding
Moshe Kaplan
 
Cloud Computing Design Best Practices
Cloud Computing Design Best PracticesCloud Computing Design Best Practices
Cloud Computing Design Best Practices
Moshe Kaplan
 

Recently uploaded (20)

Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdfComplete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Software Company
 
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
organizerofv
 
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
BookNet Canada
 
AI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global TrendsAI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global Trends
InData Labs
 
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In FranceManifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
chb3
 
How analogue intelligence complements AI
How analogue intelligence complements AIHow analogue intelligence complements AI
How analogue intelligence complements AI
Paul Rowe
 
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptxSpecial Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
shyamraj55
 
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
SOFTTECHHUB
 
Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)
Ortus Solutions, Corp
 
Rusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond SparkRusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond Spark
carlyakerly1
 
Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.
hpbmnnxrvb
 
tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
 
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-UmgebungenHCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
panagenda
 
TrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business ConsultingTrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business Consulting
Trs Labs
 
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Impelsys Inc.
 
Role of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered ManufacturingRole of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered Manufacturing
Andrew Leo
 
Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
 
Generative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in BusinessGenerative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in Business
Dr. Tathagat Varma
 
Technology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data AnalyticsTechnology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data Analytics
InData Labs
 
How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?
Daniel Lehner
 
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdfComplete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Software Company
 
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
organizerofv
 
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
BookNet Canada
 
AI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global TrendsAI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global Trends
InData Labs
 
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In FranceManifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
chb3
 
How analogue intelligence complements AI
How analogue intelligence complements AIHow analogue intelligence complements AI
How analogue intelligence complements AI
Paul Rowe
 
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptxSpecial Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
shyamraj55
 
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
SOFTTECHHUB
 
Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)
Ortus Solutions, Corp
 
Rusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond SparkRusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond Spark
carlyakerly1
 
Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.
hpbmnnxrvb
 
tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
 
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-UmgebungenHCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
panagenda
 
TrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business ConsultingTrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business Consulting
Trs Labs
 
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Impelsys Inc.
 
Role of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered ManufacturingRole of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered Manufacturing
Andrew Leo
 
Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
 
Generative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in BusinessGenerative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in Business
Dr. Tathagat Varma
 
Technology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data AnalyticsTechnology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data Analytics
InData Labs
 
How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?
Daniel Lehner
 

MySQL crash course by moshe kaplan

  • 1. The VP R&D Open Seminar MySQL Crash Course From basics to experts [email protected] http://top-performance.blogspot.com
  • 2. The VP R&D Open Seminar WHY WE CHOSE MYSQL? http://top-performance.blogspot.com
  • 3. Who is Using MySQL? 3 http://top-performance.blogspot.com
  • 4. Who is Behind MySQL http://top-performance.blogspot.com
  • 5. What MySQL is Made of? 5 http://top-performance.blogspot.com http://dev.mysql.com/tech-resources/articles/mysql_5.0_psea1.html
  • 6. MySQL Limitations 50-150M Records/Table 50-5000 SELECT Statements/Second 6 http://top-performance.blogspot.com
  • 7. Why Do I Care? From 0 to 100 (US mass adaptation) Phone: 100 yrs Radio: 40 yrs TV: 30 yrs Mobile: 20 yrs Internet: 10 yrs Facebook: 2 yrs 7 http://top-performance.blogspot.com
  • 8. 100K New Users/Week 8 http://top-performance.blogspot.com
  • 9. The VP R&D Open Seminar WHAT MYSQL IS MADE OF? http://top-performance.blogspot.com
  • 10. MySQL Structure Daemon /var/lib/mysql ibdata1 ib_logfile0, Ib_logfile1 /mysql /database /performance_schema /etc/my.cnf http://top-performance.blogspot.com
  • 11. What to Install wget mysql_package yum –y localinstall mysql_package The Packages: Devel+Client+Server Relevant platform (x86/x64) Relevant operating system http://top-performance.blogspot.com
  • 13. The VP R&D Open Seminar DATABASE LOGICAL DESIGN (OR ERD) http://top-performance.blogspot.com
  • 14. Instances, Schemas and inside information http://top-performance.blogspot.com
  • 15. 1:Many schoolId: schoolId: Primary Key Foreign Key http://top-performance.blogspot.com
  • 16. Many:Many ?: ?: Primary Key Foreign Key http://top-performance.blogspot.com
  • 17. Many:Many in Practice testId: testId, studentId: Primary Key studentId: Primary Key Foreign Key http://top-performance.blogspot.com
  • 18. Design a Student Information System ERD http://top-performance.blogspot.com
  • 19. The VP R&D Open Seminar FROM ERD TO A DATABASE http://top-performance.blogspot.com
  • 20. Connect to the Database http://top-performance.blogspot.com
  • 23. Implement the a Student Information System ERD http://top-performance.blogspot.com
  • 24. The VP R&D Open Seminar SQL: DDL http://top-performance.blogspot.com
  • 25. Databases Manipulation SHOW DATABASES; CREATE DATABASE mydb; DROP DATABASE mydb; USE mydb; http://top-performance.blogspot.com
  • 26. Tables Manipulation SHOW TABLES; CREATE TABLE users ( id int, INDEX users_id (id) ); DROP TABLE users; ALTER TABLE users ADD INDEX IX_id (id); ALTER TABLE users DROP INDEX IX_id; http://top-performance.blogspot.com
  • 27. The VP R&D Open Seminar SQL: DML http://top-performance.blogspot.com
  • 28. SELECT SELECT table.field, table.* FROM table WHERE table.field = 123 ORDER BY field1, field2 DESC http://top-performance.blogspot.com
  • 29. SELECT + Join SELECT c.*, u.* FROM classes c INNER JOIN users u ON c.teacherId = u.id http://top-performance.blogspot.com
  • 31. GROUP BY SELECT gender, count(id) FROM users WHERE gender = ‘M’ GROUP BY gender HAVING count(id) > 10 http://top-performance.blogspot.com
  • 32. UNION SELECT id FROM users WHERE gender = ‘M’ UNION ALL SELECT id FROM users WHERE gender = ‘F’ ORDER BY id; http://top-performance.blogspot.com
  • 33. UPDATE UPDATE users SET gender = ‘M’ WHERE gender IS NULL; http://top-performance.blogspot.com
  • 34. INSERT INSERT INTO users (gender) VALUES (‘M’); INSERT INTO users (gender) SELECT gender FROM users WHERE gender = ‘M’; http://top-performance.blogspot.com
  • 35. DELETE DELETE FROM users WHERE gender = ‘M’; http://top-performance.blogspot.com
  • 36. The VP R&D Open Seminar MySQL Authentication and Authorization SECURITY http://top-performance.blogspot.com
  • 37. Root User First Time mysqladmin -u root password NEWPASSWORD Nth Time mysqladmin -u root -p'oldpassword' password newpass How to enter Mysql –uuser_name –ppassword –D database_name -h host_name/ip -A http://top-performance.blogspot.com
  • 38. Users Table mysql> SELECT * FROM mysql.user limit 1G *************************** 1. row *************************** Host: localhost User: root Password: *4FB5C598BC3FF56E262F863A715F8CB2976A9C69 Select_priv: Y Insert_priv: Y Update_priv: Y Delete_priv: Y Create_priv: Y Drop_priv: Y …. 1 row in set (0.00 sec) http://top-performance.blogspot.com
  • 39. Create a Users and Provide Permissions -- Create a user w/ password CREATE USER 'readonly'@'%' IDENTIFIED BY ‘sakexkas'; -- Grant Permissions GRANT select ON my_db.* to 'readonly'@'%'; GRANT ALL PRIVILEGES ON *.* to ‘master_user’@’%’ WITH GRANT OPTION; FLUSH PRIVILEGES; -- Beware of too complex passwords http://top-performance.blogspot.com
  • 40. The VP R&D Open Seminar MYSQL AND LINUX ISSUES http://top-performance.blogspot.com
  • 41. Built in Linux Security Measures IP TABLES sudo /etc/init.d/iptables stop sudo yum –y remove iptables Configure the relevant rules SELinux sudo echo 0 > /selinux/enforce vi /etc/selinux/config: SELINUX=enforcing  SELINUX=disabled Files Limit (Table Partitioning) /etc/security/limits.conf mysql soft nofile 8192 mysql hard nofile 8192 my.cnf: open_files_limit = 8192 http://top-performance.blogspot.com
  • 43. Create a Master/Slave configuration http://top-performance.blogspot.com
  • 44. The VP R&D Open Seminar HIGH AVAILABILITY ARCHITECTURES http://top-performance.blogspot.com
  • 46. Master/Master ? http://top-performance.blogspot.com
  • 47. Show Status (1) mysql> show slave statusG *************************** 1. row *************************** Slave_IO_State: Waiting for master to send event Master_Host: 10.12.12.167 Master_User: repl Master_Port: 3306 Connect_Retry: 60 Master_Log_File: master.000094 Read_Master_Log_Pos: 167250867 Relay_Log_File: mysqld-relay-bin.000137 Relay_Log_Pos: 167251010 Relay_Master_Log_File: master.000094 Slave_IO_Running: Yes Slave_SQL_Running: Yes Replicate_Do_DB: Replicate_Ignore_DB: Replicate_Do_Table: Replicate_Ignore_Table: Replicate_Wild_Do_Table: Replicate_Wild_Ignore_Table: mysql.%,information_schema.% http://top-performance.blogspot.com
  • 48. Show Status (2) Last_Errno: 0 Last_Error: Skip_Counter: 0 Exec_Master_Log_Pos: 167250867 Relay_Log_Space: 167251310 Until_Condition: None Until_Log_File: Until_Log_Pos: 0 Master_SSL_Allowed: No Master_SSL_CA_File: Master_SSL_CA_Path: Master_SSL_Cert: Master_SSL_Cipher: Master_SSL_Key: Seconds_Behind_Master: 0 Master_SSL_Verify_Server_Cert: No Last_IO_Errno: 0 Last_IO_Error: Last_SQL_Errno: 0 Last_SQL_Error: Replicate_Ignore_Server_Ids: Master_Server_Id: 1 1 row in set (0.02 sec) http://top-performance.blogspot.com
  • 49. Skip DON’T DO THAT unless you have to! The Process: STOP SLAVE; SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 1; START SLAVE; SHOW SLAVE STATUSG http://top-performance.blogspot.com
  • 50. How to Implement? Stop a Master and record position Copy a Master (instance/disk) to a Slave Start the Master Change slave server-id SET MASTER HOST … START SLAVE Verify Or… http://top-performance.blogspot.co.il/2012/03/how-to- setup-mysql-replication-in-11.html http://top-performance.blogspot.com
  • 51. Create a Master/Slave configuration http://top-performance.blogspot.com
  • 52. The VP R&D Open Seminar SCALE-ABLE ARCHITECTURES http://top-performance.blogspot.com
  • 53. Do You Remember? 53 http://top-performance.blogspot.com
  • 54. Strategy A: Sharding 54 http://top-performance.blogspot.com
  • 55. Strategy B: In Memory Databases 55 http://top-performance.blogspot.com
  • 56. 700 Inserts/Sec In Memory Engine 3000 Inserts/Sec Amazon AWS Standard InnoDB Engine Large Instance 700 Inserts/Sec 56 http://top-performance.blogspot.com
  • 57. IMDB - Implementation 57 http://top-performance.blogspot.com
  • 58. Lessons Cache: MySQL IMDB HA: MySQL Replication Persistence: Periodic 5min Batch Scalability: Sharding 4 Bill Req/Day using 25 machines (2000/s) 58 http://top-performance.blogspot.com
  • 59. Strategy C: MapReduce 59 http://top-performance.blogspot.com
  • 60. Strategy D: NoSQL insert get multiget remove truncate <Key, Value> http://wiki.apache.org/cassandra/API 60 http://top-performance.blogspot.com
  • 61. When Should I Choose NoSQL? Eventually Consistent Document Store Key Value http://guyharrison.squarespace.com/blog/tag/nosql 61 http://top-performance.blogspot.com
  • 62. Sharding Again 62 http://top-performance.blogspot.com
  • 63. Vertical Sharding 63 http://top-performance.blogspot.com
  • 64. Horizontal Sharding Static Hashing Complex growth Mod 10 = 0 Mod 10 = 1 Simple Mod 10 = 2 Mod 10 = 3 Mod 10 = 4 Mod 10 = 5 Mod 10 = 6 Mod 10 = 7 Mod 10 = 8 Mod 10 = 9 64 http://top-performance.blogspot.com
  • 65. Horizontal Sharding Key locations are defined in a directory Simple growth Directory is SPOF 65 http://top-performance.blogspot.com
  • 66. Horizontal Sharding Static Hashing with Directory Mapping Simple Growth Small Directory still SPOF Mod 1000 = 4 66 http://top-performance.blogspot.com
  • 67. Horizontal Sharding Each key signed by DB# generated on creation Simple growth New key generation is SPOF 67 http://top-performance.blogspot.com
  • 68. Limitations: Reporting 68 http://top-performance.blogspot.com
  • 69. Best Practices $connection = new_db_connection("customer://1234"); $statement = $connection->prepare( $sql_statement, $params ); $result = $statement->execute(); 69 http://top-performance.blogspot.com
  • 70. The VP R&D Open Seminar BACKUP AND RESTORE http://top-performance.blogspot.com
  • 71. Options mysqldump Physical disk copy 3rd Party solution: XtraDB, amanda http://top-performance.blogspot.com
  • 73. The VP R&D Open Seminar HANDLING PROBLEMS http://top-performance.blogspot.com
  • 74. Error Log Get the Location: [/]$ sudo more /etc/my.cnf | grep -i error log-error=/var/lib/mysql/log.err Look for issues [/]$ sudo tail -n 20 /var/lib/mysql/log.err 121025 13:24:23 InnoDB: Initializing buffer pool, size = 128.0M 121025 13:24:23 InnoDB: Completed initialization of buffer pool 121025 13:24:24 InnoDB: highest supported file format is Barracuda. 121025 13:24:25 InnoDB: Waiting for the background threads to start http://top-performance.blogspot.com
  • 75. The VP R&D Open Seminar DEVOPS MYSQL http://top-performance.blogspot.com
  • 76. -e mysql -uuser -ppassword -Ddatabase -hserver -e”SELECT * FROM table;” http://top-performance.blogspot.com
  • 77. Import Data mysql -uuser -ppassword -Ddatabase -hserver < /dir/to/filename.sql http://top-performance.blogspot.com
  • 78. Export Data mysqldump -uuser -ppassword --databases database_name --single-transaction --master-data=1 > /path/to/backup/file.sql http://top-performance.blogspot.com
  • 79. The VP R&D Open Seminar MYSQL TUNING http://top-performance.blogspot.com
  • 82. Slow Query log-slow-queries = /var/log/mysql/mysql- slow.log long_query_time = 1 log-queries-not-using-indexes http://top-performance.blogspot.com
  • 83. explain mysql> explain SELECT COUNT(*), post_type FROM wp_posts GROUP BY post_type; +--+-------------+--------+-----+-------------+-----------+-------+----+----+-----------+ |id| select_type |table | type|possible_keys|key |key_len|ref |rows| Extra +--+-------------+--------+-----+-------------+-----------+-------+----+----+-----------+ |1 | SIMPLE |wp_posts|index|NULL |type_status| 140 |NULL|693 | Using index +--+-------------+--------+-----+-------------+-----------+-------+----+----+-----------+ 1 row in set (0.02 sec) http://top-performance.blogspot.com
  • 85. RAM Usage Optimization Preferred: SizeOf(database) < SizeOf(RAM) innodb_buffer_pool_size 50-70% of your RAM 85 http://top-performance.blogspot.com
  • 86. Do We Utilize the Cache? SHOW STATUS LIKE 'Qcache%'; Qcache_free_blocks 718 Qcache_free_memory 13004008 Qcache_hits 780759 Qcache_inserts 56292 Qcache_lowmem_prunes 0 Qcache_not_cached 3711 Qcache_queries_in_cache 1715 Qcache_total_blocks 4344 86 http://top-performance.blogspot.com
  • 87. Cache Queries query_cache_type = 1 query_cache_limit = 1M query_cache_size = 16M 87 http://top-performance.blogspot.com
  • 88. Buffer Optimization key_reads/key_read_requests < 0.01 If not Increase Key Buffer 88 http://top-performance.blogspot.com
  • 89. CPU Optimization thread_concurrency = 2 X #(CPU Cores) 89 http://top-performance.blogspot.com
  • 92. What happens when mysql fails to start… Create my.cnf touch /etc/my.cnf Create the error log vi /etc/my.cnf [mysqld] log-error=/var/lib/mysql/log.err If the my.cnf is already configured more /etc/my.cnf | grep –i error Restart mysql Find the error tail –n 50 /var/lib/mysql/log.err In this case we kill all the mysql proceses ps –aux | grep –i mysql sudo kill process_id http://top-performance.blogspot.com
  • 93. The Bottom Line: Grow ∞ Thank you! and Keep Performing! Moshe Kaplan 93 http://top-performance.blogspot.com

Editor's Notes

  • #2: The Matrix, The Architect Speach http://www.youtube.com/watch?v=mod6xr-lyBc A better w/ titles: http://www.youtube.com/watch?v=K3OXs_5AD2A Second, Kong foo: http://www.youtube.com/watch?v=j82GKTgVDkw Twitter Source: http://www.slideshare.net/Blaine/scaling-twitter
  • #8: The world is changing more and more fast You have to minimize NRE You must support unexpected demand You must provide top service (people now leaves cell operator after single incident, rather then 5, 10 years ago Firms a vulnerable – Citi worth 20Bill $ instead of 200 Bill a year ago Break and Mortar bookstores 15 years ago and Amazon…. Will it happen again to banks, insurance, real estate agencies… IS YOUR MARKET THE NEXT FOR PENETRATION – Finance? Real Estate?How to win a rival that is not existing yet? http://www.johnmwillis.com/ibm/cloud-computing-and-the-enterprise/ -
  • #69: Sharded database – OLTP Little/No reporting OLAP – must be implemented for reporting Loads data from sharded DBs Custom mechanism Any commercial
  • #87: http://www.prelovac.com/vladimir/wordpress-optimization-guide
  • #94: Start with nothing: storage, FW, LB, Server and grow… Can buy servers for more than hour