tag:blogger.com,1999:blog-85452149227875410972024-03-12T18:01:38.425-07:00Database Administrationdatabase backups, replication, installation, performance tuning, High AvailabilityAftab Khanhttp://www.blogger.com/profile/17201066985732943851noreply@blogger.comBlogger62125tag:blogger.com,1999:blog-8545214922787541097.post-3886042644647051502018-11-16T03:12:00.001-08:002018-11-16T03:13:53.642-08:00GTID implementation - Oracle vs MariaDB<br />
<div class="MsoNormal">
Oracle MySQL has implemented GTID differently from MariaDB; this
article walks through some of the key differences. <span style="mso-spacerun: yes;"> </span><br />
Before we look at the details, let’s look at
the benefits of using global transaction ID: <o:p></o:p></div>
<div class="MsoListParagraphCxSpFirst" style="mso-list: l1 level1 lfo1; text-indent: -18.0pt;">
<br />
<ul>
<li><span style="font-family: "symbol"; text-indent: -18pt;"><span style="mso-list: Ignore;">·<span style="font-family: "times new roman"; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"> </span></span></span><span style="text-indent: -18pt;">Easy to switch a slave server to replicate from
a different replication master server</span></li>
<li><span style="font-family: "symbol"; text-indent: -18pt;"><span style="mso-list: Ignore;">·<span style="font-family: "times new roman"; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;">
</span></span></span><span style="text-indent: -18pt;">Makes it simple to check the consistency of
master and slaves servers.</span></li>
<li><span style="font-family: "symbol"; text-indent: -18pt;"><span style="mso-list: Ignore;">·<span style="font-family: "times new roman"; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;">
</span></span></span><span style="text-indent: -18pt;">Ignore transactions already executed on slaves</span></li>
<li><span style="font-family: "symbol"; text-indent: -18pt;"><span style="mso-list: Ignore;">·<span style="font-family: "times new roman"; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;">
</span></span></span><span style="text-indent: -18pt;">Simplifies complex replication topology</span></li>
<li><span style="font-family: "symbol"; text-indent: -18pt;"><span style="mso-list: Ignore;">·<span style="font-family: "times new roman"; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;">
</span></span></span><span style="text-indent: -18pt;">Permits replicas to be pointed to masters at
different level of hierarchy</span></li>
</ul>
<!--[if !supportLists]--><o:p></o:p></div>
<div class="MsoListParagraphCxSpMiddle" style="mso-list: l1 level1 lfo1; text-indent: -18.0pt;">
<o:p></o:p></div>
<div class="MsoListParagraphCxSpMiddle" style="mso-list: l1 level1 lfo1; text-indent: -18.0pt;">
<o:p></o:p></div>
<div class="MsoListParagraphCxSpMiddle" style="mso-list: l1 level1 lfo1; text-indent: -18.0pt;">
<o:p></o:p></div>
<div class="MsoListParagraphCxSpMiddle" style="mso-list: l1 level1 lfo1; text-indent: -18.0pt;">
<o:p></o:p></div>
<div class="MsoListParagraphCxSpLast">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;">GTID format<o:p></o:p></b></div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-yfti-tbllook: 1184;">
<tbody>
<tr style="mso-yfti-firstrow: yes; mso-yfti-irow: 0;">
<td style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 231.05pt;" valign="top" width="308"><div align="center" class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-align: center;">
MariaDB<o:p></o:p></div>
</td>
<td style="border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 231.05pt;" valign="top" width="308"><div align="center" class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-align: center;">
MySQL<o:p></o:p></div>
</td>
</tr>
<tr style="mso-yfti-irow: 1; mso-yfti-lastrow: yes;">
<td style="border-top: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 231.05pt;" valign="top" width="308"><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;">
A GTID is represented as 3 numbers separated with dashes (-). For
example:<span style="mso-spacerun: yes;"> </span>0-1-10.<o:p></o:p></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;">
The first number is the domain ID, the second number is the server ID
and the third number is transaction id.<o:p></o:p></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;">
<br /></div>
</td>
<td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 231.05pt;" valign="top" width="308"><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;">
A GTID is represented as a pair of coordinates, separated by a colon
character (:), as shown below: <o:p></o:p></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;">
source_id:transaction_id<o:p></o:p></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;">
The source_id represents the originating server; the master’s
server_uuid is normally used for this purpose.<o:p></o:p></div>
</td>
</tr>
</tbody></table>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;">Configuration<o:p></o:p></b></div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-yfti-tbllook: 1184;">
<tbody>
<tr style="mso-yfti-firstrow: yes; mso-yfti-irow: 0;">
<td style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 225.15pt;" valign="top" width="300"><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;">
MariaDB<o:p></o:p></div>
</td>
<td style="border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 236.95pt;" valign="top" width="316"><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;">
MySQL<o:p></o:p></div>
</td>
</tr>
<tr style="mso-yfti-irow: 1;">
<td colspan="2" style="border-top: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 462.1pt;" valign="top" width="616"><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;">
Two servers are already running as master and slave, using old-style
log position based replication<o:p></o:p></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;">
<br /></div>
</td>
</tr>
<tr style="mso-yfti-irow: 2;">
<td style="border-top: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 225.15pt;" valign="top" width="300"><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;">
There is no special configuration needed of the server to start using
global transaction ID. <span style="background: white; color: #333333; font-family: "helvetica" , "sans-serif"; font-size: 10.5pt;">it can </span>be switched to using GTID
without any other actions needed:<o:p></o:p></div>
<div style="background: whitesmoke; border: solid #E3E3E3 1.0pt; mso-border-alt: solid #E3E3E3 .75pt; mso-element: para-border-div; padding: 7.0pt 7.0pt 7.0pt 7.0pt;">
<div class="MsoNormal" style="background: whitesmoke; border: none; line-height: normal; margin-bottom: 15.0pt; mso-border-alt: solid #E3E3E3 .75pt; mso-padding-alt: 7.0pt 7.0pt 7.0pt 7.0pt; padding: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt; word-break: break-all;">
<span style="color: #333333; font-family: "consolas"; font-size: 10.0pt;">STOP SLAVE;<o:p></o:p></span></div>
<div class="MsoNormal" style="background: whitesmoke; border: none; line-height: normal; margin-bottom: 15.0pt; mso-border-alt: solid #E3E3E3 .75pt; mso-padding-alt: 7.0pt 7.0pt 7.0pt 7.0pt; padding: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt; word-break: break-all;">
<span style="color: #333333; font-family: "consolas"; font-size: 10.0pt;">CHANGE MASTER TO .., <o:p></o:p></span></div>
<div class="MsoNormal" style="background: whitesmoke; border: none; line-height: normal; margin-bottom: 15.0pt; mso-border-alt: solid #E3E3E3 .75pt; mso-padding-alt: 7.0pt 7.0pt 7.0pt 7.0pt; padding: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt; word-break: break-all;">
<b style="mso-bidi-font-weight: normal;"><u><span style="color: #333333; font-family: "consolas"; font-size: 10.0pt;">master_use_gtid=current_pos</span></u></b><span style="color: #333333; font-family: "consolas"; font-size: 10.0pt;">;<o:p></o:p></span></div>
<div class="MsoNormal" style="background: whitesmoke; border: none; line-height: normal; margin-bottom: 15.0pt; mso-border-alt: solid #E3E3E3 .75pt; mso-padding-alt: 7.0pt 7.0pt 7.0pt 7.0pt; padding: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt; word-break: break-all;">
<span style="color: #333333; font-family: "consolas"; font-size: 10.0pt;">START SLAVE;<o:p></o:p></span></div>
</div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;">
<br /></div>
</td>
<td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 236.95pt;" valign="top" width="316"><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;">
Online procedure works with 5.7.6+, it goes through series of steps:<o:p></o:p></div>
<div class="MsoListParagraphCxSpFirst" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-add-space: auto; mso-list: l1 level1 lfo1; text-indent: -18.0pt;">
<!--[if !supportLists]--><span style="font-family: "symbol"; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"><span style="mso-list: Ignore;">·<span style="font: 7.0pt "Times New Roman";">
</span></span></span><!--[endif]-->On each server, set <span style="color: #333333; font-family: "consolas"; font-size: 10.0pt;">enforce_gtid_consistency</span> to <span style="color: #333333; font-family: "consolas"; font-size: 10.0pt;">WARN</span><o:p></o:p></div>
<div class="MsoListParagraphCxSpMiddle" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-add-space: auto;">
Let the servers run for a
while, <b style="mso-bidi-font-weight: normal;"><u>you must ensure </u></b><u>that
above step <b style="mso-bidi-font-weight: normal;">does not cause any warnings
</b>in MySQL error log</u>.<o:p></o:p></div>
<div class="MsoListParagraphCxSpMiddle" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-add-space: auto; mso-list: l1 level1 lfo1; text-indent: -18.0pt;">
<!--[if !supportLists]--><span style="font-family: "symbol"; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"><span style="mso-list: Ignore;">·<span style="font: 7.0pt "Times New Roman";">
</span></span></span><!--[endif]-->On each server, set <span class="token"><span style="background: #f8f8f8; border: none 1.0pt; color: #ee9900; font-size: 9.5pt; padding: 0cm;">enforce_gtid_consistency</span></span>
to <span style="color: #333333; font-family: "consolas"; font-size: 10.0pt;">ON</span><o:p></o:p></div>
<div class="MsoListParagraphCxSpMiddle" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-add-space: auto; mso-list: l1 level1 lfo1; text-indent: -18.0pt;">
<!--[if !supportLists]--><span style="font-family: "symbol"; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"><span style="mso-list: Ignore;">·<span style="font: 7.0pt "Times New Roman";">
</span></span></span><!--[endif]-->On each server, set <span class="token"><span style="background: #f8f8f8; border: none 1.0pt; color: #0077aa; font-size: 9.5pt; padding: 0cm;">GTID_MODE</span></span>
to <span class="token"><span style="background: #f8f8f8; border: none 1.0pt; color: #ee9900; font-size: 9.5pt; padding: 0cm;">OFF_PERMISSIVE</span></span>
<o:p></o:p></div>
<div class="MsoListParagraphCxSpMiddle" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-add-space: auto; mso-list: l1 level1 lfo1; text-indent: -18.0pt;">
<!--[if !supportLists]--><span style="font-family: "symbol"; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"><span style="mso-list: Ignore;">·<span style="font: 7.0pt "Times New Roman";">
</span></span></span><!--[endif]-->Wait until all anonymous gets replicated:<o:p></o:p></div>
<div class="MsoListParagraphCxSpMiddle" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-add-space: auto; mso-list: l1 level1 lfo1; text-indent: -18.0pt;">
<!--[if !supportLists]--><span style="color: #333333; font-family: "symbol"; font-size: 10.0pt;"><span style="mso-list: Ignore;">·<span style="font: 7.0pt "Times New Roman";">
</span></span></span><!--[endif]--><span class="token"><span style="background: #f8f8f8; border: none 1.0pt; color: #0077aa; font-family: "consolas"; font-size: 9.5pt; padding: 0cm;">SHOW</span></span><span class="token"><span style="background: #f8f8f8; border: none 1.0pt; color: #0077aa; font-size: 9.5pt; padding: 0cm;"> </span></span><span class="token"><span style="background: #f8f8f8; border: none 1.0pt; color: #0077aa; font-family: "consolas"; font-size: 9.5pt; padding: 0cm;">STATUS</span></span><span class="token"><span style="background: #f8f8f8; border: none 1.0pt; color: #0077aa; font-size: 9.5pt; padding: 0cm;"> </span></span><span class="token"><span style="background: #f8f8f8; border: none 1.0pt; color: #0077aa; font-family: "consolas"; font-size: 9.5pt; padding: 0cm;">LIKE</span></span><span style="color: #333333; font-family: "consolas"; font-size: 10.0pt;"> </span><span class="token"><span style="background: #f8f8f8; border: none 1.0pt; color: #ee9900; font-family: "consolas"; font-size: 9.5pt; padding: 0cm;">'ONGOING_ANONYMOUS_TRANSACTION_COUNT'</span></span><span style="color: #333333; font-size: 10.0pt;">;</span><span style="color: #333333; font-family: "consolas"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoListParagraphCxSpMiddle" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-add-space: auto; mso-list: l1 level1 lfo1; text-indent: -18.0pt;">
<!--[if !supportLists]--><span style="color: #333333; font-family: "symbol"; font-size: 10.0pt;"><span style="mso-list: Ignore;">·<span style="font: 7.0pt "Times New Roman";">
</span></span></span><!--[endif]--><span style="color: #333333; font-size: 10.0pt;">On each server,
execute:</span><span style="color: #333333; font-family: "consolas"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoListParagraphCxSpMiddle" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-add-space: auto; mso-list: l1 level1 lfo1; text-indent: -18.0pt;">
<!--[if !supportLists]--><span style="color: #333333; font-family: "symbol"; font-size: 10.0pt;"><span style="mso-list: Ignore;">·<span style="font: 7.0pt "Times New Roman";">
</span></span></span><!--[endif]--><span class="token"><span style="background: #f8f8f8; border: none 1.0pt; color: #0077aa; font-family: "consolas"; font-size: 9.5pt; padding: 0cm;">SET</span></span><span style="background: #f8f8f8; color: black; font-family: "consolas"; font-size: 9.5pt;"> </span><span class="token"><span style="background: #f8f8f8; border: none 1.0pt; color: #ee9900; font-family: "consolas"; font-size: 9.5pt; padding: 0cm;">@@GLOBAL.GTID_MODE</span></span><span style="background: #f8f8f8; color: black; font-family: "consolas"; font-size: 9.5pt;"> </span><span class="token"><span style="background: #f8f8f8; border: none 1.0pt; color: #a67f59; font-family: "consolas"; font-size: 9.5pt; padding: 0cm;">=</span></span><span style="background: #f8f8f8; color: black; font-family: "consolas"; font-size: 9.5pt;"> </span><span class="token"><span style="background: #f8f8f8; border: none 1.0pt; color: #0077aa; font-family: "consolas"; font-size: 9.5pt; padding: 0cm;">ON</span></span><span class="token"><span style="background: #f8f8f8; border: none 1.0pt; color: #999999; font-family: "consolas"; font-size: 9.5pt; padding: 0cm;">;</span></span><span style="color: #333333; font-family: "consolas"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoListParagraphCxSpLast" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-add-space: auto; mso-list: l1 level1 lfo1; text-indent: -18.0pt;">
<!--[if !supportLists]--><span style="font-family: "symbol"; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"><span style="mso-list: Ignore;">·<span style="font: 7.0pt "Times New Roman";">
</span></span></span><!--[endif]-->For more information, see online manual <a href="https://dev.mysql.com/doc/refman/5.7/en/replication-mode-change-online-enable-gtids.html">here</a><o:p></o:p></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;">
<br /></div>
</td>
</tr>
<tr style="mso-yfti-irow: 3;">
<td colspan="2" style="border-top: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 462.1pt;" valign="top" width="616"><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;">
<b style="mso-bidi-font-weight: normal;">Crash-safe<o:p></o:p></b></div>
</td>
</tr>
<tr style="mso-yfti-irow: 4; mso-yfti-lastrow: yes;">
<td style="border-top: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 225.15pt;" valign="top" width="300"><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;">
It is crash-safe without any other actions needed. The state of the
slave is crash-safe; slave keeps track of its current positions in the <span class="token"><span style="background: #f8f8f8; border: none 1.0pt; color: #ee9900; font-family: "consolas"; font-size: 9.5pt; padding: 0cm;">mysql.gtid_slave_pos</span></span> system table. Updates
to the state are done in the same transaction as the updates to the data.<o:p></o:p></div>
</td>
<td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 236.95pt;" valign="top" width="316"><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;">
The state of the slave is crash-safe with following settings:<o:p></o:p></div>
<div class="MsoListParagraphCxSpFirst" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-add-space: auto; mso-list: l0 level1 lfo2; text-indent: -18.0pt;">
<!--[if !supportLists]--><span style="color: black; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-list: Ignore;">a)<span style="font: 7.0pt "Times New Roman";"> </span></span></span><!--[endif]--><span style="background: white; color: black; font-family: "courier new"; font-size: 10.0pt;">--relay-log-info-repository </span>is set to TABLE so that slave can
keep track of its current position in the<span style="background: white; color: black; font-family: "courier new"; font-size: 10.0pt;">
mysql.slave_relay_log_info </span>system table. Updates to the relay log info
log table are committed together with the transactions.<o:p></o:p></div>
<div class="MsoListParagraphCxSpLast" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-add-space: auto; mso-list: l0 level1 lfo2; text-indent: -18.0pt;">
<!--[if !supportLists]--><span style="color: black; font-family: "courier new"; font-size: 10.0pt;"><span style="mso-list: Ignore;">b)<span style="font: 7.0pt "Times New Roman";"> </span></span></span><!--[endif]-->To
ensure automatic relay log recovery immediately following server start-up,
the <a href="https://dev.mysql.com/doc/refman/8.0/en/replication-options-slave.html#option_mysqld_relay-log-recovery"><code><span style="border: none 1.0pt; color: black; font-size: 10.0pt; padding: 0cm; text-decoration: none;">--relay-log-recovery</span></code></a>
must be enabled<o:p></o:p></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;">
<br /></div>
</td>
</tr>
</tbody></table>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;">Errant transactions<o:p></o:p></b></div>
<div class="MsoNormal">
Any writes applied directly to the replication slave is
known as Errant transactions, such transaction/writes do not exists on other
slaves connected to the same master. Table below lists the way they are handled
in MariaDB vs MySQL;<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-yfti-tbllook: 1184;">
<tbody>
<tr style="mso-yfti-firstrow: yes; mso-yfti-irow: 0;">
<td style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 231.05pt;" valign="top" width="308"><div align="center" class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-align: center;">
MariaDB<o:p></o:p></div>
</td>
<td style="border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 231.05pt;" valign="top" width="308"><div align="center" class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-align: center;">
MySQL<o:p></o:p></div>
</td>
</tr>
<tr style="mso-yfti-irow: 1; mso-yfti-lastrow: yes;">
<td style="border-top: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 231.05pt;" valign="top" width="308"><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;">
MariaDB may generate errors<span style="mso-spacerun: yes;"> </span>when
the slave restarts due to GTIDs being present on the slave but absent from
the master, for example:<o:p></o:p></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;">
<span style="mso-spacerun: yes;"> </span><i style="mso-bidi-font-style: normal;">Last_IO_Error: Got fatal error 1236 from
master when reading data from binary log: 'Error: connecting slave requested
to start from GTID 0-102-786684, which is not in the master's binlog'<o:p></o:p></i></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;">
<br /></div>
</td>
<td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 231.05pt;" valign="top" width="308"><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;">
You may discover errant transactions when performing maintenance
operation which verify replication topology and reports presence of errant
transactions. However the procedure to fix errant requires injecting empty
transaction(s). It is crucial to avoid errant transactions in MySQL, as it
can prevent failover!<o:p></o:p></div>
</td>
</tr>
</tbody></table>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;">Skipping transactions<o:p></o:p></b></div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-yfti-tbllook: 1184;">
<tbody>
<tr style="mso-yfti-firstrow: yes; mso-yfti-irow: 0;">
<td style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 231.05pt;" valign="top" width="308"><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;">
MariaDB<o:p></o:p></div>
</td>
<td style="border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 231.05pt;" valign="top" width="308"><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;">
MySQL<o:p></o:p></div>
</td>
</tr>
<tr style="mso-yfti-irow: 1;">
<td colspan="2" style="border-top: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 462.1pt;" valign="top" width="616"><div align="center" class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-align: center;">
<br /></div>
<div align="center" class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-align: center;">
<code><span style="border: none 1.0pt; color: black; font-size: 10.0pt; padding: 0cm;">set global sql_slave_skip_counter = 1<o:p></o:p></span></code></div>
<div align="center" class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-align: center;">
<br /></div>
</td>
</tr>
<tr style="mso-yfti-irow: 2; mso-yfti-lastrow: yes;">
<td style="border-top: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 231.05pt;" valign="top" width="308"><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;">
Still works and can be used moderately. However, it would not work
when using parallel replication.<o:p></o:p></div>
</td>
<td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 231.05pt;" valign="top" width="308"><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;">
Not supported. If you need to skip transactions, use the value of the
master's<span style="background: white; color: #555555; font-family: "arial" , "sans-serif"; font-size: 10.5pt;"> </span><a href="https://dev.mysql.com/doc/refman/5.6/en/replication-options-gtids.html#sysvar_gtid_executed"><code><span style="border: none 1.0pt; color: black; font-size: 10.0pt; padding: 0cm; text-decoration: none;">gtid_executed</span></code></a><span style="background: white; color: #555555; font-family: "arial" , "sans-serif"; font-size: 10.5pt;"> </span>variable instead; see<span style="background: white; color: #555555; font-family: "arial" , "sans-serif"; font-size: 10.5pt;"> </span><a href="https://dev.mysql.com/doc/refman/5.6/en/replication-gtids-failover.html#replication-gtids-failover-empty" title="Injecting empty transactions"><span style="background: white; color: #0074a3; font-family: "arial" , "sans-serif"; font-size: 7.5pt;">Injecting
empty transactions</span></a><span style="background: white; color: #555555; font-family: "arial" , "sans-serif"; font-size: 10.5pt;">, </span>for more information.<o:p></o:p></div>
</td>
</tr>
</tbody></table>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b style="mso-bidi-font-weight: normal;">Ignore transactions
already executed <o:p></o:p></b></div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-yfti-tbllook: 1184;">
<tbody>
<tr style="mso-yfti-firstrow: yes; mso-yfti-irow: 0;">
<td style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 231.05pt;" valign="top" width="308"><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;">
<b style="mso-bidi-font-weight: normal;">MariaDB<o:p></o:p></b></div>
</td>
<td style="border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 231.05pt;" valign="top" width="308"><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;">
<b style="mso-bidi-font-weight: normal;">MySQL<o:p></o:p></b></div>
</td>
</tr>
<tr style="mso-yfti-irow: 1; mso-yfti-lastrow: yes;">
<td style="border-top: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 231.05pt;" valign="top" width="308"><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;">
The default behaviour is to allow such transaction more than once on
the slave. However, when <code><span style="border: none 1.0pt; color: black; font-size: 10.0pt; padding: 0cm;">gtid_stict_mode</span></code>
is enabled , error is raised and replication stops <span style="mso-spacerun: yes;"> </span>e.g.<o:p></o:p></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;">
<b style="mso-bidi-font-weight: normal;"><span style="mso-spacerun: yes;"> </span></b><i style="mso-bidi-font-style: normal;"><span style="mso-spacerun: yes;"> </span>Last_SQL_Error: An
attempt was made to binlog GTID 0-101-786685 which would create an
out-of-order sequen ce number with existing GTID 0-101-786685, and gtid
strict mode is enabled.</i><b style="mso-bidi-font-weight: normal;"><o:p></o:p></b></div>
</td>
<td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 231.05pt;" valign="top" width="308"><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;">
Any attempt to execute a subsequent transaction with the same GTID is
ignored by that server. No error is raised, and no statement in the
transaction is executed.<b style="mso-bidi-font-weight: normal;"><o:p></o:p></b></div>
</td>
</tr>
</tbody></table>
<div class="MsoNormal">
<br /></div>
<br /><div class="blogger-post-footer"><script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-8190616-1");
pageTracker._trackPageview();
} catch(err) {}</script></div>Aftab Khanhttp://www.blogger.com/profile/17201066985732943851noreply@blogger.com0tag:blogger.com,1999:blog-8545214922787541097.post-52606088342057421462018-10-26T07:58:00.002-07:002018-10-26T07:58:34.252-07:00Export to JSON from MySQL All Ready for MongoDB<div style="background-color: white; box-sizing: inherit; color: #373a3c; font-family: "Helvetica Neue", Helvetica, Arial, Open-sans, sans-serif; font-size: 13px; line-height: 21px; margin-bottom: 1rem; margin-top: 10px !important;">
This post walks through how to export data from <a href="https://dev.mysql.com/" style="background-color: transparent; box-sizing: inherit; color: #bf3119; font-family: "Open Sans", sans-serif; text-decoration-line: none; transition: all 0.25s ease-in-out 0s;" target="_blank">MySQL</a>® into JSON format, ready to ingest into <a href="https://www.mongodb.com/" style="background-color: transparent; box-sizing: inherit; color: #bf3119; font-family: "Open Sans", sans-serif; text-decoration-line: none; transition: all 0.25s ease-in-out 0s;" target="_blank">MongoDB</a>®. Starting from MySQL 5.7+, there is native support for JSON. MySQL provides functions that actually create JSON values, so I will be using these functions in this article to export to JSON from MySQL:</div>
<ul style="background-color: white; box-sizing: inherit; color: #373a3c; font-family: "Helvetica Neue", Helvetica, Arial, Open-sans, sans-serif; font-size: 13px; margin-bottom: 1rem; margin-top: 0px;">
<li style="box-sizing: inherit;">JSON_OBJECT</li>
<li style="box-sizing: inherit;">JSON_ARRAY</li>
</ul>
<div style="background-color: white; box-sizing: inherit; color: #373a3c; font-family: "Helvetica Neue", Helvetica, Arial, Open-sans, sans-serif; font-size: 13px; line-height: 21px; margin-bottom: 1rem; margin-top: 10px !important;">
These functions make it easy to convert MySQL data to JSON e.g.</div>
<div class="crayon-syntax crayon-theme-familiar crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-5bd32b7380150871752611" style="background-color: white; border-width: 1px !important; box-sizing: border-box; color: #373a3c; direction: ltr !important; font-family: Monaco, MonacoRegular, "Courier New", monospace; font-size: 12px !important; height: auto; line-height: 15px !important; margin: 12px 0px; overflow: hidden !important; padding: 0px; position: relative !important; text-shadow: none !important; text-size-adjust: none; width: 660px;">
<div class="crayon-toolbar" data-settings=" show" style="background: rgb(238, 238, 238) !important; border-bottom: 1px solid rgb(222, 222, 222) !important; border-image: initial; border-left: 0px; border-right: 0px; border-top: 0px; box-sizing: inherit; height: 18px !important; line-height: 18px !important; margin: 0px; overflow: hidden; padding: 0px; position: relative; width: 660px; z-index: 4;">
<span class="crayon-title" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; float: left; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; padding: 0px 4px !important;"></span><div class="crayon-tools" style="background: 0px center; border: 0px; box-sizing: inherit; float: right !important; font-family: inherit; font-weight: inherit !important; height: 18px !important; line-height: 18px !important; margin: 0px; padding: 0px; position: absolute; right: 0px;">
<div class="crayon-button crayon-nums-button crayon-pressed" style="background-attachment: initial; background-clip: initial; background-color: rgb(188, 188, 188) !important; background-image: initial; background-origin: initial; background-position: -24px 0px; background-repeat: no-repeat; background-size: initial; border: 0px; box-sizing: inherit; color: white; display: inline; float: left !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: 15px; margin: 0px; padding: 0px; position: relative; width: 24px;" title="Toggle Line Numbers">
<div class="crayon-button-icon" style="background: url("https://www.percona.com/community-blog/wp-content/plugins/crayon-syntax-highlighter/css/images/toolbar/buttons@2x.png") -24px -32px / 48px 128px; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: 16px !important; left: 0px; line-height: inherit !important; margin: -8px 0px 0px; padding: 0px; position: absolute; top: 9px; width: 24px;">
</div>
</div>
<div class="crayon-button crayon-plain-button" style="background-attachment: initial; background-clip: initial; background-color: transparent !important; background-image: initial; background-origin: initial; background-position: 0px center; background-repeat: no-repeat; background-size: initial; border: 0px; box-sizing: inherit; display: inline; float: left !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: 15px; margin: 0px; padding: 0px; position: relative; width: 24px;" title="Toggle Plain Code">
<div class="crayon-button-icon" style="background: url("https://www.percona.com/community-blog/wp-content/plugins/crayon-syntax-highlighter/css/images/toolbar/buttons@2x.png") 0px -48px / 48px 128px; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: 16px !important; left: 0px; line-height: inherit !important; margin: -8px 0px 0px; padding: 0px; position: absolute; top: 9px; width: 24px;">
</div>
</div>
<div class="crayon-button crayon-wrap-button" style="background-attachment: initial; background-clip: initial; background-color: transparent !important; background-image: initial; background-origin: initial; background-position: 0px center; background-repeat: no-repeat; background-size: initial; border: 0px; box-sizing: inherit; display: inline; float: left !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: 15px; margin: 0px; padding: 0px; position: relative; width: 24px;" title="Toggle Line Wrap">
<div class="crayon-button-icon" style="background: url("https://www.percona.com/community-blog/wp-content/plugins/crayon-syntax-highlighter/css/images/toolbar/buttons@2x.png") 0px -112px / 48px 128px; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: 16px !important; left: 0px; line-height: inherit !important; margin: -8px 0px 0px; padding: 0px; position: absolute; top: 9px; width: 24px;">
</div>
</div>
<div class="crayon-button crayon-expand-button" style="background-attachment: initial; background-clip: initial; background-color: transparent !important; background-image: initial; background-origin: initial; background-position: 0px center; background-repeat: no-repeat; background-size: initial; border: 0px; box-sizing: inherit; display: inline; float: left !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: 15px; margin: 0px; padding: 0px; position: relative; width: 24px;" title="Expand Code">
<div class="crayon-button-icon" style="background: url("https://www.percona.com/community-blog/wp-content/plugins/crayon-syntax-highlighter/css/images/toolbar/buttons@2x.png") 0px -96px / 48px 128px; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: 16px !important; left: 0px; line-height: inherit !important; margin: -8px 0px 0px; padding: 0px; position: absolute; top: 9px; width: 24px;">
</div>
</div>
<div class="crayon-button crayon-copy-button" style="background-attachment: initial; background-clip: initial; background-color: transparent !important; background-image: initial; background-origin: initial; background-position: 0px center; background-repeat: no-repeat; background-size: initial; border: 0px; box-sizing: inherit; display: inline; float: left !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: 15px; margin: 0px; padding: 0px; position: relative; width: 24px;" title="Copy">
<div class="crayon-button-icon" style="background: url("https://www.percona.com/community-blog/wp-content/plugins/crayon-syntax-highlighter/css/images/toolbar/buttons@2x.png") 0px -16px / 48px 128px; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: 16px !important; left: 0px; line-height: inherit !important; margin: -8px 0px 0px; padding: 0px; position: absolute; top: 9px; width: 24px;">
</div>
</div>
<div class="crayon-button crayon-popup-button" style="background-attachment: initial; background-clip: initial; background-color: transparent !important; background-image: initial; background-origin: initial; background-position: 0px center; background-repeat: no-repeat; background-size: initial; border: 0px; box-sizing: inherit; display: inline; float: left !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: 15px; margin: 0px; padding: 0px; position: relative; width: 24px;" title="Open Code In New Window">
<div class="crayon-button-icon" style="background: url("https://www.percona.com/community-blog/wp-content/plugins/crayon-syntax-highlighter/css/images/toolbar/buttons@2x.png") 0px 0px / 48px 128px; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: 16px !important; left: 0px; line-height: inherit !important; margin: -8px 0px 0px; padding: 0px; position: absolute; top: 9px; width: 24px;">
</div>
</div>
<span class="crayon-language" style="box-sizing: inherit; color: rgb(153, 153, 153) !important; float: left; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; padding: 0px 8px 0px 4px !important;">Shell</span></div>
</div>
<div class="crayon-plain-wrap" style="background: 0px center; border: 0px; box-sizing: inherit; height: auto !important; margin: 0px !important; padding: 0px !important;">
<textarea class="crayon-plain print-no" data-settings="click" readonly="" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-color: initial; border-radius: 0px; border-style: initial; border-width: 0px; box-shadow: none; color: black; font-family: Monaco, MonacoRegular, "Courier New", monospace !important; font-size: 12px !important; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; height: 138px; line-height: 15px !important; margin: 0px; max-width: 100%; opacity: 0; overflow-wrap: normal; overflow: hidden; padding-left: 5px; padding-right: 5px; padding-top: 0px; position: absolute; resize: none; tab-size: 4; white-space: pre; width: 660px; z-index: 0;" wrap="soft"></textarea></div>
<div class="crayon-main" style="background: 0px center; border: 0px; box-sizing: inherit; margin: 0px; overflow: hidden; padding: 0px; position: relative; width: 660px; z-index: 1;">
<table class="crayon-table" style="background: none !important; border-collapse: collapse !important; border-spacing: 0px !important; border: none !important; box-sizing: inherit; font-size: 12px; margin-bottom: 0px !important; margin-left: 0px; margin-right: 0px !important; margin-top: 0px !important; padding: 0px !important; table-layout: auto !important; width: auto !important;"><tbody style="box-sizing: inherit;">
<tr class="crayon-row" style="background: 0px center; border: none !important; box-sizing: inherit; margin: 0px !important; padding: 0px !important; vertical-align: top !important;"><td class="crayon-nums " data-settings="show" style="background: 0px center; border-bottom: 0px; border-image: initial; border-left: 0px; border-right: 3px solid rgb(108, 226, 108) !important; border-top: 0px; box-sizing: inherit; color: rgb(175, 175, 175) !important; margin: 0px !important; padding: 0px 5px 0px 0px !important; vertical-align: top !important;"><div class="crayon-nums-content" style="background: 0px center; border: 0px; box-sizing: inherit; line-height: 15px !important; margin: 0px; padding: 0px; white-space: nowrap;">
<div class="crayon-num" data-line="crayon-5bd32b7380150871752611-1" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
1</div>
<div class="crayon-num crayon-striped-num" data-line="crayon-5bd32b7380150871752611-2" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
2</div>
<div class="crayon-num" data-line="crayon-5bd32b7380150871752611-3" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
3</div>
<div class="crayon-num crayon-striped-num" data-line="crayon-5bd32b7380150871752611-4" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
4</div>
<div class="crayon-num" data-line="crayon-5bd32b7380150871752611-5" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
5</div>
<div class="crayon-num crayon-striped-num" data-line="crayon-5bd32b7380150871752611-6" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
6</div>
<div class="crayon-num" data-line="crayon-5bd32b7380150871752611-7" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
7</div>
<div class="crayon-num crayon-striped-num" data-line="crayon-5bd32b7380150871752611-8" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
8</div>
</div>
</td><td class="crayon-code" style="background: 0px center; border: 0px; box-sizing: inherit; margin: 0px !important; padding: 0px !important; vertical-align: top !important; width: 801.5px;"><div class="crayon-pre" style="background: none !important; border: none !important; box-sizing: inherit; line-height: 15px !important; margin: 0px; overflow: visible; padding: 0px; tab-size: 4; white-space: pre;">
<div class="crayon-line" id="crayon-5bd32b7380150871752611-1" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding-bottom: 0px; padding-left: 10px !important; padding-right: 5px; padding-top: 0px;">
<span class="crayon-v" style="box-sizing: inherit; color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">mysql</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">></span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-e" style="box-sizing: inherit; color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">SELECT </span><span class="crayon-e" style="box-sizing: inherit; color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">json_object</span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">(</span><span class="crayon-s" style="box-sizing: inherit; color: rgb(0, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">'employee_id'</span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">,</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-v" style="box-sizing: inherit; color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">emp_no</span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">,</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-s" style="box-sizing: inherit; color: rgb(0, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">'first_name'</span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">,</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-v" style="box-sizing: inherit; color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">first</span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">_</span>name<span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">)</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-st" style="box-sizing: inherit; color: rgb(128, 0, 128) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">AS</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-s" style="box-sizing: inherit; color: rgb(0, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">'JSON'</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-e" style="box-sizing: inherit; color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">FROM </span><span class="crayon-e" style="box-sizing: inherit; color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">employees </span><span class="crayon-i" style="box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">LIMIT</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">2</span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">;</span></div>
<div class="crayon-line crayon-striped-line" id="crayon-5bd32b7380150871752611-2" style="background: rgb(249, 249, 249) !important; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding-bottom: 0px; padding-left: 10px !important; padding-right: 5px; padding-top: 0px;">
<span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">+</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">+</span></div>
<div class="crayon-line" id="crayon-5bd32b7380150871752611-3" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding-bottom: 0px; padding-left: 10px !important; padding-right: 5px; padding-top: 0px;">
<span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">|</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-v" style="box-sizing: inherit; color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">JSON</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">|</span></div>
<div class="crayon-line crayon-striped-line" id="crayon-5bd32b7380150871752611-4" style="background: rgb(249, 249, 249) !important; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding-bottom: 0px; padding-left: 10px !important; padding-right: 5px; padding-top: 0px;">
<span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">+</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">+</span></div>
<div class="crayon-line" id="crayon-5bd32b7380150871752611-5" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding-bottom: 0px; padding-left: 10px !important; padding-right: 5px; padding-top: 0px;">
<span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">|</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">{</span><span class="crayon-s" style="box-sizing: inherit; color: rgb(0, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">"first_name"</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">:</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-s" style="box-sizing: inherit; color: rgb(0, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">"Aamer"</span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">,</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-s" style="box-sizing: inherit; color: rgb(0, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">"employee_id"</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">:</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">444117</span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">}</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">|</span></div>
<div class="crayon-line crayon-striped-line" id="crayon-5bd32b7380150871752611-6" style="background: rgb(249, 249, 249) !important; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding-bottom: 0px; padding-left: 10px !important; padding-right: 5px; padding-top: 0px;">
<span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">|</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">{</span><span class="crayon-s" style="box-sizing: inherit; color: rgb(0, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">"first_name"</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">:</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-s" style="box-sizing: inherit; color: rgb(0, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">"Aamer"</span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">,</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-s" style="box-sizing: inherit; color: rgb(0, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">"employee_id"</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">:</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">409151</span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">}</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">|</span></div>
<div class="crayon-line" id="crayon-5bd32b7380150871752611-7" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding-bottom: 0px; padding-left: 10px !important; padding-right: 5px; padding-top: 0px;">
<span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">+</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">+</span></div>
<div class="crayon-line crayon-striped-line" id="crayon-5bd32b7380150871752611-8" style="background: rgb(249, 249, 249) !important; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding-bottom: 0px; padding-left: 10px !important; padding-right: 5px; padding-top: 0px;">
<span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">2</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-e" style="box-sizing: inherit; color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">rows </span><span class="crayon-st" style="box-sizing: inherit; color: rgb(128, 0, 128) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">in</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-e" style="box-sizing: inherit; color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">set</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">(</span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">0.00</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-v" style="box-sizing: inherit; color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">sec</span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">)</span></div>
</div>
</td></tr>
</tbody></table>
</div>
</div>
<div style="background-color: white; box-sizing: inherit; color: #373a3c; font-family: "Helvetica Neue", Helvetica, Arial, Open-sans, sans-serif; font-size: 13px; line-height: 21px; margin-bottom: 1rem; margin-top: 10px !important;">
In this article, I will be using the employees sample database available from here:<br style="box-sizing: inherit;" /><a href="https://dev.mysql.com/doc/employee/en/employees-installation.html" style="background-color: transparent; box-sizing: inherit; color: #bf3119; font-family: "Open Sans", sans-serif; text-decoration-line: none; transition: all 0.25s ease-in-out 0s;" target="_blank">https://dev.mysql.com/doc/employee/en/employees-installation.html</a></div>
<div style="background-color: white; box-sizing: inherit; color: #373a3c; font-family: "Helvetica Neue", Helvetica, Arial, Open-sans, sans-serif; font-size: 13px; line-height: 21px; margin-bottom: 1rem; margin-top: 10px !important;">
The employees schema:</div>
<div style="background-color: white; box-sizing: inherit; color: #373a3c; font-family: "Helvetica Neue", Helvetica, Arial, Open-sans, sans-serif; font-size: 13px; line-height: 21px; margin-bottom: 1rem; margin-top: 10px !important;">
<a href="https://dev.mysql.com/doc/employee/en/images/employees-schema.png" style="background-color: transparent; box-sizing: inherit; color: #bf3119; font-family: "Open Sans", sans-serif; text-decoration-line: none; transition: all 0.25s ease-in-out 0s;" target="_blank"><img alt="Employee schema from MySQL https://dev.mysql.com/doc/employee/en/images/employees-schema.png" class="alignnone" height="822" scale="0" src="https://dev.mysql.com/doc/employee/en/images/employees-schema.png" style="border: none; box-sizing: inherit; height: auto; max-width: 100%; vertical-align: middle;" width="800" /></a></div>
<div style="background-color: white; box-sizing: inherit; color: #373a3c; font-family: "Helvetica Neue", Helvetica, Arial, Open-sans, sans-serif; font-size: 13px; line-height: 21px; margin-bottom: 1rem; margin-top: 10px !important;">
When mapping relations with collections, generally there is no one to one mapping, you would want to merge data from some MySQL tables into a single collection.</div>
<h2 style="background-color: white; box-sizing: inherit; color: #373a3c; font-family: "Helvetica Neue", Helvetica, Arial, Open-sans, sans-serif; font-size: 24px !important; line-height: 36px; margin-bottom: 0.5rem; margin-top: 0px;">
Export data to JSON format</h2>
<div style="background-color: white; box-sizing: inherit; color: #373a3c; font-family: "Helvetica Neue", Helvetica, Arial, Open-sans, sans-serif; font-size: 13px; line-height: 21px; margin-bottom: 1rem; margin-top: 10px !important;">
To export data, I have constructed the following SQL (the data is combined from 3 different tables: employees, salaries, and departments):</div>
<div class="crayon-syntax crayon-theme-familiar crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-5bd32b7380158139593729" style="background-color: white; border-width: 1px !important; box-sizing: border-box; color: #373a3c; direction: ltr !important; font-family: Monaco, MonacoRegular, "Courier New", monospace; font-size: 12px !important; height: auto; line-height: 15px !important; margin: 12px 0px; overflow: hidden !important; padding: 0px; position: relative !important; text-shadow: none !important; text-size-adjust: none; width: 660px;">
<div class="crayon-toolbar" data-settings=" show" style="background: rgb(238, 238, 238) !important; border-bottom: 1px solid rgb(222, 222, 222) !important; border-image: initial; border-left: 0px; border-right: 0px; border-top: 0px; box-sizing: inherit; height: 18px !important; line-height: 18px !important; margin: 0px; overflow: hidden; padding: 0px; position: relative; width: 660px; z-index: 4;">
<span class="crayon-title" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; float: left; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; padding: 0px 4px !important;"></span><div class="crayon-tools" style="background: 0px center; border: 0px; box-sizing: inherit; float: right !important; font-family: inherit; font-weight: inherit !important; height: 18px !important; line-height: 18px !important; margin: 0px; padding: 0px; position: absolute; right: 0px;">
<div class="crayon-button crayon-nums-button crayon-pressed" style="background-attachment: initial; background-clip: initial; background-color: rgb(188, 188, 188) !important; background-image: initial; background-origin: initial; background-position: -24px 0px; background-repeat: no-repeat; background-size: initial; border: 0px; box-sizing: inherit; color: white; display: inline; float: left !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: 15px; margin: 0px; padding: 0px; position: relative; width: 24px;" title="Toggle Line Numbers">
<div class="crayon-button-icon" style="background: url("https://www.percona.com/community-blog/wp-content/plugins/crayon-syntax-highlighter/css/images/toolbar/buttons@2x.png") -24px -32px / 48px 128px; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: 16px !important; left: 0px; line-height: inherit !important; margin: -8px 0px 0px; padding: 0px; position: absolute; top: 9px; width: 24px;">
</div>
</div>
<div class="crayon-button crayon-plain-button" style="background-attachment: initial; background-clip: initial; background-color: transparent !important; background-image: initial; background-origin: initial; background-position: 0px center; background-repeat: no-repeat; background-size: initial; border: 0px; box-sizing: inherit; display: inline; float: left !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: 15px; margin: 0px; padding: 0px; position: relative; width: 24px;" title="Toggle Plain Code">
<div class="crayon-button-icon" style="background: url("https://www.percona.com/community-blog/wp-content/plugins/crayon-syntax-highlighter/css/images/toolbar/buttons@2x.png") 0px -48px / 48px 128px; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: 16px !important; left: 0px; line-height: inherit !important; margin: -8px 0px 0px; padding: 0px; position: absolute; top: 9px; width: 24px;">
</div>
</div>
<div class="crayon-button crayon-wrap-button" style="background-attachment: initial; background-clip: initial; background-color: transparent !important; background-image: initial; background-origin: initial; background-position: 0px center; background-repeat: no-repeat; background-size: initial; border: 0px; box-sizing: inherit; display: inline; float: left !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: 15px; margin: 0px; padding: 0px; position: relative; width: 24px;" title="Toggle Line Wrap">
<div class="crayon-button-icon" style="background: url("https://www.percona.com/community-blog/wp-content/plugins/crayon-syntax-highlighter/css/images/toolbar/buttons@2x.png") 0px -112px / 48px 128px; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: 16px !important; left: 0px; line-height: inherit !important; margin: -8px 0px 0px; padding: 0px; position: absolute; top: 9px; width: 24px;">
</div>
</div>
<div class="crayon-button crayon-expand-button" style="background-attachment: initial; background-clip: initial; background-color: transparent !important; background-image: initial; background-origin: initial; background-position: 0px center; background-repeat: no-repeat; background-size: initial; border: 0px; box-sizing: inherit; display: inline; float: left !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: 15px; margin: 0px; padding: 0px; position: relative; width: 24px;" title="Expand Code">
<div class="crayon-button-icon" style="background: url("https://www.percona.com/community-blog/wp-content/plugins/crayon-syntax-highlighter/css/images/toolbar/buttons@2x.png") 0px -96px / 48px 128px; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: 16px !important; left: 0px; line-height: inherit !important; margin: -8px 0px 0px; padding: 0px; position: absolute; top: 9px; width: 24px;">
</div>
</div>
<div class="crayon-button crayon-copy-button" style="background-attachment: initial; background-clip: initial; background-color: transparent !important; background-image: initial; background-origin: initial; background-position: 0px center; background-repeat: no-repeat; background-size: initial; border: 0px; box-sizing: inherit; display: inline; float: left !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: 15px; margin: 0px; padding: 0px; position: relative; width: 24px;" title="Copy">
<div class="crayon-button-icon" style="background: url("https://www.percona.com/community-blog/wp-content/plugins/crayon-syntax-highlighter/css/images/toolbar/buttons@2x.png") 0px -16px / 48px 128px; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: 16px !important; left: 0px; line-height: inherit !important; margin: -8px 0px 0px; padding: 0px; position: absolute; top: 9px; width: 24px;">
</div>
</div>
<div class="crayon-button crayon-popup-button" style="background-attachment: initial; background-clip: initial; background-color: transparent !important; background-image: initial; background-origin: initial; background-position: 0px center; background-repeat: no-repeat; background-size: initial; border: 0px; box-sizing: inherit; display: inline; float: left !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: 15px; margin: 0px; padding: 0px; position: relative; width: 24px;" title="Open Code In New Window">
<div class="crayon-button-icon" style="background: url("https://www.percona.com/community-blog/wp-content/plugins/crayon-syntax-highlighter/css/images/toolbar/buttons@2x.png") 0px 0px / 48px 128px; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: 16px !important; left: 0px; line-height: inherit !important; margin: -8px 0px 0px; padding: 0px; position: absolute; top: 9px; width: 24px;">
</div>
</div>
<span class="crayon-language" style="box-sizing: inherit; color: rgb(153, 153, 153) !important; float: left; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; padding: 0px 8px 0px 4px !important;">Shell</span></div>
</div>
<div class="crayon-plain-wrap" style="background: 0px center; border: 0px; box-sizing: inherit; height: auto !important; margin: 0px !important; padding: 0px !important;">
<textarea class="crayon-plain print-no" data-settings="click" readonly="" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-color: initial; border-radius: 0px; border-style: initial; border-width: 0px; box-shadow: none; color: black; font-family: Monaco, MonacoRegular, "Courier New", monospace !important; font-size: 12px !important; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; height: 468px; line-height: 15px !important; margin: 0px; max-width: 100%; opacity: 0; overflow-wrap: normal; overflow: hidden; padding-left: 5px; padding-right: 5px; padding-top: 0px; position: absolute; resize: none; tab-size: 4; white-space: pre; width: 660px; z-index: 0;" wrap="soft"></textarea></div>
<div class="crayon-main" style="background: 0px center; border: 0px; box-sizing: inherit; margin: 0px; overflow: hidden; padding: 0px; position: relative; width: 660px; z-index: 1;">
<table class="crayon-table" style="background: none !important; border-collapse: collapse !important; border-spacing: 0px !important; border: none !important; box-sizing: inherit; font-size: 12px; margin-bottom: 0px !important; margin-left: 0px; margin-right: 0px !important; margin-top: 0px !important; padding: 0px !important; table-layout: auto !important; width: auto !important;"><tbody style="box-sizing: inherit;">
<tr class="crayon-row" style="background: 0px center; border: none !important; box-sizing: inherit; margin: 0px !important; padding: 0px !important; vertical-align: top !important;"><td class="crayon-nums " data-settings="show" style="background: 0px center; border-bottom: 0px; border-image: initial; border-left: 0px; border-right: 3px solid rgb(108, 226, 108) !important; border-top: 0px; box-sizing: inherit; color: rgb(175, 175, 175) !important; margin: 0px !important; padding: 0px 5px 0px 0px !important; vertical-align: top !important;"><div class="crayon-nums-content" style="background: 0px center; border: 0px; box-sizing: inherit; line-height: 15px !important; margin: 0px; padding: 0px; white-space: nowrap;">
<div class="crayon-num" data-line="crayon-5bd32b7380158139593729-1" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
1</div>
<div class="crayon-num crayon-striped-num" data-line="crayon-5bd32b7380158139593729-2" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
2</div>
<div class="crayon-num" data-line="crayon-5bd32b7380158139593729-3" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
3</div>
<div class="crayon-num crayon-striped-num" data-line="crayon-5bd32b7380158139593729-4" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
4</div>
<div class="crayon-num" data-line="crayon-5bd32b7380158139593729-5" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
5</div>
<div class="crayon-num crayon-striped-num" data-line="crayon-5bd32b7380158139593729-6" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
6</div>
<div class="crayon-num" data-line="crayon-5bd32b7380158139593729-7" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
7</div>
<div class="crayon-num crayon-striped-num" data-line="crayon-5bd32b7380158139593729-8" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
8</div>
<div class="crayon-num" data-line="crayon-5bd32b7380158139593729-9" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
9</div>
<div class="crayon-num crayon-striped-num" data-line="crayon-5bd32b7380158139593729-10" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
10</div>
<div class="crayon-num" data-line="crayon-5bd32b7380158139593729-11" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
11</div>
<div class="crayon-num crayon-striped-num" data-line="crayon-5bd32b7380158139593729-12" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
12</div>
<div class="crayon-num" data-line="crayon-5bd32b7380158139593729-13" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
13</div>
<div class="crayon-num crayon-striped-num" data-line="crayon-5bd32b7380158139593729-14" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
14</div>
<div class="crayon-num" data-line="crayon-5bd32b7380158139593729-15" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
15</div>
<div class="crayon-num crayon-striped-num" data-line="crayon-5bd32b7380158139593729-16" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
16</div>
<div class="crayon-num" data-line="crayon-5bd32b7380158139593729-17" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
17</div>
<div class="crayon-num crayon-striped-num" data-line="crayon-5bd32b7380158139593729-18" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
18</div>
<div class="crayon-num" data-line="crayon-5bd32b7380158139593729-19" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
19</div>
<div class="crayon-num crayon-striped-num" data-line="crayon-5bd32b7380158139593729-20" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
20</div>
<div class="crayon-num" data-line="crayon-5bd32b7380158139593729-21" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
21</div>
<div class="crayon-num crayon-striped-num" data-line="crayon-5bd32b7380158139593729-22" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
22</div>
<div class="crayon-num" data-line="crayon-5bd32b7380158139593729-23" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
23</div>
<div class="crayon-num crayon-striped-num" data-line="crayon-5bd32b7380158139593729-24" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
24</div>
<div class="crayon-num" data-line="crayon-5bd32b7380158139593729-25" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
25</div>
<div class="crayon-num crayon-striped-num" data-line="crayon-5bd32b7380158139593729-26" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
26</div>
<div class="crayon-num" data-line="crayon-5bd32b7380158139593729-27" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
27</div>
<div class="crayon-num crayon-striped-num" data-line="crayon-5bd32b7380158139593729-28" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
28</div>
<div class="crayon-num" data-line="crayon-5bd32b7380158139593729-29" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
29</div>
<div class="crayon-num crayon-striped-num" data-line="crayon-5bd32b7380158139593729-30" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
30</div>
</div>
</td><td class="crayon-code" style="background: 0px center; border: 0px; box-sizing: inherit; margin: 0px !important; padding: 0px !important; vertical-align: top !important; width: 686.5px;"><div class="crayon-pre" style="background: none !important; border: none !important; box-sizing: inherit; line-height: 15px !important; margin: 0px; overflow: visible; padding: 0px; tab-size: 4; white-space: pre;">
<div class="crayon-line" id="crayon-5bd32b7380158139593729-1" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding-bottom: 0px; padding-left: 10px !important; padding-right: 5px; padding-top: 0px;">
<span class="crayon-e" style="box-sizing: inherit; color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">SELECT </span><span class="crayon-e" style="box-sizing: inherit; color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">json_pretty</span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">(</span><span class="crayon-e" style="box-sizing: inherit; color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">json_object</span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">(</span></div>
<div class="crayon-line crayon-striped-line" id="crayon-5bd32b7380158139593729-2" style="background: rgb(249, 249, 249) !important; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding-bottom: 0px; padding-left: 10px !important; padding-right: 5px; padding-top: 0px;">
<span class="crayon-s" style="box-sizing: inherit; color: rgb(0, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">'emp_no'</span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">,</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-v" style="box-sizing: inherit; color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">emp</span><span class="crayon-e" style="box-sizing: inherit; color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">.emp_no</span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">,</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span></div>
<div class="crayon-line" id="crayon-5bd32b7380158139593729-3" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding-bottom: 0px; padding-left: 10px !important; padding-right: 5px; padding-top: 0px;">
<span class="crayon-s" style="box-sizing: inherit; color: rgb(0, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">'first_name'</span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">,</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-v" style="box-sizing: inherit; color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">emp</span><span class="crayon-e" style="box-sizing: inherit; color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">.first_name</span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">,</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span></div>
<div class="crayon-line crayon-striped-line" id="crayon-5bd32b7380158139593729-4" style="background: rgb(249, 249, 249) !important; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding-bottom: 0px; padding-left: 10px !important; padding-right: 5px; padding-top: 0px;">
<span class="crayon-s" style="box-sizing: inherit; color: rgb(0, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">'last_name'</span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">,</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-v" style="box-sizing: inherit; color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">emp</span><span class="crayon-e" style="box-sizing: inherit; color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">.last_name</span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">,</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span></div>
<div class="crayon-line" id="crayon-5bd32b7380158139593729-5" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding-bottom: 0px; padding-left: 10px !important; padding-right: 5px; padding-top: 0px;">
<span class="crayon-s" style="box-sizing: inherit; color: rgb(0, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">'hire_date'</span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">,</span></div>
<div class="crayon-line crayon-striped-line" id="crayon-5bd32b7380158139593729-6" style="background: rgb(249, 249, 249) !important; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding-bottom: 0px; padding-left: 10px !important; padding-right: 5px; padding-top: 0px;">
<span class="crayon-e" style="box-sizing: inherit; color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">json_object</span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">(</span><span class="crayon-s" style="box-sizing: inherit; color: rgb(0, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">"$date"</span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">,</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-e" style="box-sizing: inherit; color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">DATE_FORMAT</span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">(</span><span class="crayon-v" style="box-sizing: inherit; color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">emp</span><span class="crayon-e" style="box-sizing: inherit; color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">.hire_date</span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">,</span><span class="crayon-s" style="box-sizing: inherit; color: rgb(0, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">'%Y-%m-%dT%TZ'</span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">)</span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">)</span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">,</span></div>
<div class="crayon-line" id="crayon-5bd32b7380158139593729-7" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding-bottom: 0px; padding-left: 10px !important; padding-right: 5px; padding-top: 0px;">
<span class="crayon-s" style="box-sizing: inherit; color: rgb(0, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">'Department'</span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">,</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-e" style="box-sizing: inherit; color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">JSON_ARRAY</span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">(</span><span class="crayon-e" style="box-sizing: inherit; color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">json_object</span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">(</span><span class="crayon-s" style="box-sizing: inherit; color: rgb(0, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">'dept_id'</span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">,</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-v" style="box-sizing: inherit; color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">dept</span><span class="crayon-e" style="box-sizing: inherit; color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">.dept_no</span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">,</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-s" style="box-sizing: inherit; color: rgb(0, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">'dept_name'</span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">,</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-v" style="box-sizing: inherit; color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">dept</span><span class="crayon-e" style="box-sizing: inherit; color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">.dept_name</span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">)</span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">)</span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">,</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span></div>
<div class="crayon-line crayon-striped-line" id="crayon-5bd32b7380158139593729-8" style="background: rgb(249, 249, 249) !important; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding-bottom: 0px; padding-left: 10px !important; padding-right: 5px; padding-top: 0px;">
<span class="crayon-s" style="box-sizing: inherit; color: rgb(0, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">'Salary'</span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">,</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-v" style="box-sizing: inherit; color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">s</span><span class="crayon-e" style="box-sizing: inherit; color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">.salary</span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">)</span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">)</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-st" style="box-sizing: inherit; color: rgb(128, 0, 128) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">AS</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-s" style="box-sizing: inherit; color: rgb(0, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">'json'</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span></div>
<div class="crayon-line" id="crayon-5bd32b7380158139593729-9" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding-bottom: 0px; padding-left: 10px !important; padding-right: 5px; padding-top: 0px;">
<span class="crayon-e" style="box-sizing: inherit; color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">FROM </span><span class="crayon-e" style="box-sizing: inherit; color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">employees </span><span class="crayon-e" style="box-sizing: inherit; color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">emp</span></div>
<div class="crayon-line crayon-striped-line" id="crayon-5bd32b7380158139593729-10" style="background: rgb(249, 249, 249) !important; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding-bottom: 0px; padding-left: 10px !important; padding-right: 5px; padding-top: 0px;">
<span class="crayon-e" style="box-sizing: inherit; color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">INNER </span><span class="crayon-r" style="box-sizing: inherit; color: rgb(128, 0, 128) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">JOIN</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-i" style="box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">salaries</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-i" style="box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">s</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-i" style="box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">ON</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-v" style="box-sizing: inherit; color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">s</span><span class="crayon-e" style="box-sizing: inherit; color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">.emp_no</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">=</span><span class="crayon-v" style="box-sizing: inherit; color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">emp</span><span class="crayon-e" style="box-sizing: inherit; color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">.emp_no</span></div>
<div class="crayon-line" id="crayon-5bd32b7380158139593729-11" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding-bottom: 0px; padding-left: 10px !important; padding-right: 5px; padding-top: 0px;">
<span class="crayon-e" style="box-sizing: inherit; color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">INNER </span><span class="crayon-r" style="box-sizing: inherit; color: rgb(128, 0, 128) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">JOIN</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-v" style="box-sizing: inherit; color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">current_dept</span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">_</span>emp<span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-i" style="box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">c</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-i" style="box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">on</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-v" style="box-sizing: inherit; color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">c</span><span class="crayon-e" style="box-sizing: inherit; color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">.emp_no</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">=</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-v" style="box-sizing: inherit; color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">emp</span><span class="crayon-e" style="box-sizing: inherit; color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">.emp_no</span></div>
<div class="crayon-line crayon-striped-line" id="crayon-5bd32b7380158139593729-12" style="background: rgb(249, 249, 249) !important; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding-bottom: 0px; padding-left: 10px !important; padding-right: 5px; padding-top: 0px;">
<span class="crayon-e" style="box-sizing: inherit; color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">INNER </span><span class="crayon-r" style="box-sizing: inherit; color: rgb(128, 0, 128) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">JOIN</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-e" style="box-sizing: inherit; color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">departments </span><span class="crayon-e" style="box-sizing: inherit; color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">dept </span><span class="crayon-e" style="box-sizing: inherit; color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">on </span><span class="crayon-v" style="box-sizing: inherit; color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">dept</span><span class="crayon-e" style="box-sizing: inherit; color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">.dept_no</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">=</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-v" style="box-sizing: inherit; color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">c</span><span class="crayon-e" style="box-sizing: inherit; color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">.dept_no</span></div>
<div class="crayon-line" id="crayon-5bd32b7380158139593729-13" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding-bottom: 0px; padding-left: 10px !important; padding-right: 5px; padding-top: 0px;">
<span class="crayon-i" style="box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">LIMIT</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">1</span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">;</span></div>
<div class="crayon-line crayon-striped-line" id="crayon-5bd32b7380158139593729-14" style="background: rgb(249, 249, 249) !important; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding-bottom: 0px; padding-left: 10px !important; padding-right: 5px; padding-top: 0px;">
</div>
<div class="crayon-line" id="crayon-5bd32b7380158139593729-15" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding-bottom: 0px; padding-left: 10px !important; padding-right: 5px; padding-top: 0px;">
<span class="crayon-v" style="box-sizing: inherit; color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">Output</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">:</span></div>
<div class="crayon-line crayon-striped-line" id="crayon-5bd32b7380158139593729-16" style="background: rgb(249, 249, 249) !important; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding-bottom: 0px; padding-left: 10px !important; padding-right: 5px; padding-top: 0px;">
</div>
<div class="crayon-line" id="crayon-5bd32b7380158139593729-17" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding-bottom: 0px; padding-left: 10px !important; padding-right: 5px; padding-top: 0px;">
<span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">*</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">*</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">*</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">*</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">*</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">*</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">*</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">*</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">*</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">*</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">*</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">*</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">*</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">*</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">*</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">*</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">*</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">*</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">*</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">*</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">*</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">*</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">*</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">*</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">*</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">*</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">*</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">1.</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-v" style="box-sizing: inherit; color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">row</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">*</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">*</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">*</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">*</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">*</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">*</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">*</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">*</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">*</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">*</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">*</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">*</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">*</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">*</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">*</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">*</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">*</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">*</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">*</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">*</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">*</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">*</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">*</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">*</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">*</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">*</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">*</span></div>
<div class="crayon-line crayon-striped-line" id="crayon-5bd32b7380158139593729-18" style="background: rgb(249, 249, 249) !important; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding-bottom: 0px; padding-left: 10px !important; padding-right: 5px; padding-top: 0px;">
<span class="crayon-v" style="box-sizing: inherit; color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">json</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">:</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">{</span></div>
<div class="crayon-line" id="crayon-5bd32b7380158139593729-19" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding-bottom: 0px; padding-left: 10px !important; padding-right: 5px; padding-top: 0px;">
<span class="crayon-s" style="box-sizing: inherit; color: rgb(0, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">"Salary"</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">:</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">60117</span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">,</span></div>
<div class="crayon-line crayon-striped-line" id="crayon-5bd32b7380158139593729-20" style="background: rgb(249, 249, 249) !important; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding-bottom: 0px; padding-left: 10px !important; padding-right: 5px; padding-top: 0px;">
<span class="crayon-s" style="box-sizing: inherit; color: rgb(0, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">"emp_no"</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">:</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">10001</span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">,</span></div>
<div class="crayon-line" id="crayon-5bd32b7380158139593729-21" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding-bottom: 0px; padding-left: 10px !important; padding-right: 5px; padding-top: 0px;">
<span class="crayon-s" style="box-sizing: inherit; color: rgb(0, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">"hire_date"</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">:</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-s" style="box-sizing: inherit; color: rgb(0, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">"1986-06-26"</span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">,</span></div>
<div class="crayon-line crayon-striped-line" id="crayon-5bd32b7380158139593729-22" style="background: rgb(249, 249, 249) !important; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding-bottom: 0px; padding-left: 10px !important; padding-right: 5px; padding-top: 0px;">
<span class="crayon-s" style="box-sizing: inherit; color: rgb(0, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">"last_name"</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">:</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-s" style="box-sizing: inherit; color: rgb(0, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">"Facello"</span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">,</span></div>
<div class="crayon-line" id="crayon-5bd32b7380158139593729-23" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding-bottom: 0px; padding-left: 10px !important; padding-right: 5px; padding-top: 0px;">
<span class="crayon-s" style="box-sizing: inherit; color: rgb(0, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">"Department"</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">:</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">[</span></div>
<div class="crayon-line crayon-striped-line" id="crayon-5bd32b7380158139593729-24" style="background: rgb(249, 249, 249) !important; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding-bottom: 0px; padding-left: 10px !important; padding-right: 5px; padding-top: 0px;">
<span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">{</span></div>
<div class="crayon-line" id="crayon-5bd32b7380158139593729-25" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding-bottom: 0px; padding-left: 10px !important; padding-right: 5px; padding-top: 0px;">
<span class="crayon-s" style="box-sizing: inherit; color: rgb(0, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">"dept_id"</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">:</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-s" style="box-sizing: inherit; color: rgb(0, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">"d005"</span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">,</span></div>
<div class="crayon-line crayon-striped-line" id="crayon-5bd32b7380158139593729-26" style="background: rgb(249, 249, 249) !important; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding-bottom: 0px; padding-left: 10px !important; padding-right: 5px; padding-top: 0px;">
<span class="crayon-s" style="box-sizing: inherit; color: rgb(0, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">"dept_name"</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">:</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-s" style="box-sizing: inherit; color: rgb(0, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">"Development"</span></div>
<div class="crayon-line" id="crayon-5bd32b7380158139593729-27" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding-bottom: 0px; padding-left: 10px !important; padding-right: 5px; padding-top: 0px;">
<span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">}</span></div>
<div class="crayon-line crayon-striped-line" id="crayon-5bd32b7380158139593729-28" style="background: rgb(249, 249, 249) !important; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding-bottom: 0px; padding-left: 10px !important; padding-right: 5px; padding-top: 0px;">
<span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">]</span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">,</span></div>
<div class="crayon-line" id="crayon-5bd32b7380158139593729-29" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding-bottom: 0px; padding-left: 10px !important; padding-right: 5px; padding-top: 0px;">
<span class="crayon-s" style="box-sizing: inherit; color: rgb(0, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">"first_name"</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">:</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-s" style="box-sizing: inherit; color: rgb(0, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">"Georgi"</span></div>
<div class="crayon-line crayon-striped-line" id="crayon-5bd32b7380158139593729-30" style="background: rgb(249, 249, 249) !important; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding-bottom: 0px; padding-left: 10px !important; padding-right: 5px; padding-top: 0px;">
<span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">}</span></div>
</div>
</td></tr>
</tbody></table>
</div>
</div>
<div style="background-color: white; box-sizing: inherit; color: #373a3c; font-family: "Helvetica Neue", Helvetica, Arial, Open-sans, sans-serif; font-size: 13px; line-height: 21px; margin-bottom: 1rem; margin-top: 10px !important;">
You can see from this that json_object did not convert ‘hire_date’ column value to be compatible with MongoDB. We have to convert date into ISODate format:</div>
<div class="crayon-syntax crayon-theme-familiar crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-5bd32b738015a347735058" style="background-color: white; border-width: 1px !important; box-sizing: border-box; color: #373a3c; direction: ltr !important; font-family: Monaco, MonacoRegular, "Courier New", monospace; font-size: 12px !important; height: auto; line-height: 15px !important; margin: 12px 0px; overflow: hidden !important; padding: 0px; position: relative !important; text-shadow: none !important; text-size-adjust: none; width: 660px;">
<div class="crayon-toolbar" data-settings=" show" style="background: rgb(238, 238, 238) !important; border-bottom: 1px solid rgb(222, 222, 222) !important; border-image: initial; border-left: 0px; border-right: 0px; border-top: 0px; box-sizing: inherit; height: 18px !important; line-height: 18px !important; margin: 0px; overflow: hidden; padding: 0px; position: relative; width: 660px; z-index: 4;">
<span class="crayon-title" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; float: left; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; padding: 0px 4px !important;"></span><div class="crayon-tools" style="background: 0px center; border: 0px; box-sizing: inherit; float: right !important; font-family: inherit; font-weight: inherit !important; height: 18px !important; line-height: 18px !important; margin: 0px; padding: 0px; position: absolute; right: 0px;">
<div class="crayon-button crayon-nums-button crayon-pressed" style="background-attachment: initial; background-clip: initial; background-color: rgb(188, 188, 188) !important; background-image: initial; background-origin: initial; background-position: -24px 0px; background-repeat: no-repeat; background-size: initial; border: 0px; box-sizing: inherit; color: white; display: inline; float: left !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: 15px; margin: 0px; padding: 0px; position: relative; width: 24px;" title="Toggle Line Numbers">
<div class="crayon-button-icon" style="background: url("https://www.percona.com/community-blog/wp-content/plugins/crayon-syntax-highlighter/css/images/toolbar/buttons@2x.png") -24px -32px / 48px 128px; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: 16px !important; left: 0px; line-height: inherit !important; margin: -8px 0px 0px; padding: 0px; position: absolute; top: 9px; width: 24px;">
</div>
</div>
<div class="crayon-button crayon-plain-button" style="background-attachment: initial; background-clip: initial; background-color: transparent !important; background-image: initial; background-origin: initial; background-position: 0px center; background-repeat: no-repeat; background-size: initial; border: 0px; box-sizing: inherit; display: inline; float: left !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: 15px; margin: 0px; padding: 0px; position: relative; width: 24px;" title="Toggle Plain Code">
<div class="crayon-button-icon" style="background: url("https://www.percona.com/community-blog/wp-content/plugins/crayon-syntax-highlighter/css/images/toolbar/buttons@2x.png") 0px -48px / 48px 128px; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: 16px !important; left: 0px; line-height: inherit !important; margin: -8px 0px 0px; padding: 0px; position: absolute; top: 9px; width: 24px;">
</div>
</div>
<div class="crayon-button crayon-wrap-button" style="background-attachment: initial; background-clip: initial; background-color: transparent !important; background-image: initial; background-origin: initial; background-position: 0px center; background-repeat: no-repeat; background-size: initial; border: 0px; box-sizing: inherit; display: inline; float: left !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: 15px; margin: 0px; padding: 0px; position: relative; width: 24px;" title="Toggle Line Wrap">
<div class="crayon-button-icon" style="background: url("https://www.percona.com/community-blog/wp-content/plugins/crayon-syntax-highlighter/css/images/toolbar/buttons@2x.png") 0px -112px / 48px 128px; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: 16px !important; left: 0px; line-height: inherit !important; margin: -8px 0px 0px; padding: 0px; position: absolute; top: 9px; width: 24px;">
</div>
</div>
<div class="crayon-button crayon-expand-button" style="background-attachment: initial; background-clip: initial; background-color: transparent !important; background-image: initial; background-origin: initial; background-position: 0px center; background-repeat: no-repeat; background-size: initial; border: 0px; box-sizing: inherit; display: inline; float: left !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: 15px; margin: 0px; padding: 0px; position: relative; width: 24px;" title="Expand Code">
<div class="crayon-button-icon" style="background: url("https://www.percona.com/community-blog/wp-content/plugins/crayon-syntax-highlighter/css/images/toolbar/buttons@2x.png") 0px -96px / 48px 128px; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: 16px !important; left: 0px; line-height: inherit !important; margin: -8px 0px 0px; padding: 0px; position: absolute; top: 9px; width: 24px;">
</div>
</div>
<div class="crayon-button crayon-copy-button" style="background-attachment: initial; background-clip: initial; background-color: transparent !important; background-image: initial; background-origin: initial; background-position: 0px center; background-repeat: no-repeat; background-size: initial; border: 0px; box-sizing: inherit; display: inline; float: left !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: 15px; margin: 0px; padding: 0px; position: relative; width: 24px;" title="Copy">
<div class="crayon-button-icon" style="background: url("https://www.percona.com/community-blog/wp-content/plugins/crayon-syntax-highlighter/css/images/toolbar/buttons@2x.png") 0px -16px / 48px 128px; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: 16px !important; left: 0px; line-height: inherit !important; margin: -8px 0px 0px; padding: 0px; position: absolute; top: 9px; width: 24px;">
</div>
</div>
<div class="crayon-button crayon-popup-button" style="background-attachment: initial; background-clip: initial; background-color: transparent !important; background-image: initial; background-origin: initial; background-position: 0px center; background-repeat: no-repeat; background-size: initial; border: 0px; box-sizing: inherit; display: inline; float: left !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: 15px; margin: 0px; padding: 0px; position: relative; width: 24px;" title="Open Code In New Window">
<div class="crayon-button-icon" style="background: url("https://www.percona.com/community-blog/wp-content/plugins/crayon-syntax-highlighter/css/images/toolbar/buttons@2x.png") 0px 0px / 48px 128px; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: 16px !important; left: 0px; line-height: inherit !important; margin: -8px 0px 0px; padding: 0px; position: absolute; top: 9px; width: 24px;">
</div>
</div>
<span class="crayon-language" style="box-sizing: inherit; color: rgb(153, 153, 153) !important; float: left; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; padding: 0px 8px 0px 4px !important;">Shell</span></div>
</div>
<div class="crayon-plain-wrap" style="background: 0px center; border: 0px; box-sizing: inherit; height: auto !important; margin: 0px !important; padding: 0px !important;">
<textarea class="crayon-plain print-no" data-settings="click" readonly="" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-color: initial; border-radius: 0px; border-style: initial; border-width: 0px; box-shadow: none; color: black; font-family: Monaco, MonacoRegular, "Courier New", monospace !important; font-size: 12px !important; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; height: 123px; line-height: 15px !important; margin: 0px; max-width: 100%; opacity: 0; overflow-wrap: normal; overflow: hidden; padding-left: 5px; padding-right: 5px; padding-top: 0px; position: absolute; resize: none; tab-size: 4; white-space: pre; width: 660px; z-index: 0;" wrap="soft"></textarea></div>
<div class="crayon-main" style="background: 0px center; border: 0px; box-sizing: inherit; margin: 0px; overflow: hidden; padding: 0px; position: relative; width: 660px; z-index: 1;">
<table class="crayon-table" style="background: none !important; border-collapse: collapse !important; border-spacing: 0px !important; border: none !important; box-sizing: inherit; font-size: 12px; margin-bottom: 0px !important; margin-left: 0px; margin-right: 0px !important; margin-top: 0px !important; padding: 0px !important; table-layout: auto !important; width: auto !important;"><tbody style="box-sizing: inherit;">
<tr class="crayon-row" style="background: 0px center; border: none !important; box-sizing: inherit; margin: 0px !important; padding: 0px !important; vertical-align: top !important;"><td class="crayon-nums " data-settings="show" style="background: 0px center; border-bottom: 0px; border-image: initial; border-left: 0px; border-right: 3px solid rgb(108, 226, 108) !important; border-top: 0px; box-sizing: inherit; color: rgb(175, 175, 175) !important; margin: 0px !important; padding: 0px 5px 0px 0px !important; vertical-align: top !important;"><div class="crayon-nums-content" style="background: 0px center; border: 0px; box-sizing: inherit; line-height: 15px !important; margin: 0px; padding: 0px; white-space: nowrap;">
<div class="crayon-num" data-line="crayon-5bd32b738015a347735058-1" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
1</div>
<div class="crayon-num crayon-striped-num" data-line="crayon-5bd32b738015a347735058-2" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
2</div>
<div class="crayon-num" data-line="crayon-5bd32b738015a347735058-3" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
3</div>
<div class="crayon-num crayon-striped-num" data-line="crayon-5bd32b738015a347735058-4" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
4</div>
<div class="crayon-num" data-line="crayon-5bd32b738015a347735058-5" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
5</div>
<div class="crayon-num crayon-striped-num" data-line="crayon-5bd32b738015a347735058-6" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
6</div>
<div class="crayon-num" data-line="crayon-5bd32b738015a347735058-7" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
7</div>
</div>
</td><td class="crayon-code" style="background: 0px center; border: 0px; box-sizing: inherit; margin: 0px !important; padding: 0px !important; vertical-align: top !important; width: 1241px;"><div class="crayon-pre" style="background: none !important; border: none !important; box-sizing: inherit; line-height: 15px !important; margin: 0px; overflow: visible; padding: 0px; tab-size: 4; white-space: pre;">
<div class="crayon-line" id="crayon-5bd32b738015a347735058-1" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding-bottom: 0px; padding-left: 10px !important; padding-right: 5px; padding-top: 0px;">
<span class="crayon-v" style="box-sizing: inherit; color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">mysql</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">></span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-e" style="box-sizing: inherit; color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">select </span><span class="crayon-e" style="box-sizing: inherit; color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">json_object</span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">(</span><span class="crayon-s" style="box-sizing: inherit; color: rgb(0, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">'hire_date'</span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">,</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-v" style="box-sizing: inherit; color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">hire_date</span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">)</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-st" style="box-sizing: inherit; color: rgb(128, 0, 128) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">AS</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-s" style="box-sizing: inherit; color: rgb(0, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">"Original Date"</span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">,</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-e" style="box-sizing: inherit; color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">json_object</span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">(</span><span class="crayon-s" style="box-sizing: inherit; color: rgb(0, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">'hire_date'</span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">,</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-e" style="box-sizing: inherit; color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">DATE_FORMAT</span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">(</span><span class="crayon-v" style="box-sizing: inherit; color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">hire_date</span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">,</span><span class="crayon-s" style="box-sizing: inherit; color: rgb(0, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">'%Y-%m-%dT%TZ'</span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">)</span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">)</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-st" style="box-sizing: inherit; color: rgb(128, 0, 128) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">AS</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-s" style="box-sizing: inherit; color: rgb(0, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">"ISODate"</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-e" style="box-sizing: inherit; color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">from </span><span class="crayon-e" style="box-sizing: inherit; color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">employees </span><span class="crayon-i" style="box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">limit</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">1</span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">;</span></div>
<div class="crayon-line crayon-striped-line" id="crayon-5bd32b738015a347735058-2" style="background: rgb(249, 249, 249) !important; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding-bottom: 0px; padding-left: 10px !important; padding-right: 5px; padding-top: 0px;">
<span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">+</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">-</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">+</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">-</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">+</span></div>
<div class="crayon-line" id="crayon-5bd32b738015a347735058-3" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding-bottom: 0px; padding-left: 10px !important; padding-right: 5px; padding-top: 0px;">
<span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">|</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-e" style="box-sizing: inherit; color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">Original </span><span class="crayon-r" style="box-sizing: inherit; color: rgb(128, 0, 128) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">Date</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">|</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-v" style="box-sizing: inherit; color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">ISODate</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">|</span></div>
<div class="crayon-line crayon-striped-line" id="crayon-5bd32b738015a347735058-4" style="background: rgb(249, 249, 249) !important; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding-bottom: 0px; padding-left: 10px !important; padding-right: 5px; padding-top: 0px;">
<span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">+</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">-</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">+</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">-</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">+</span></div>
<div class="crayon-line" id="crayon-5bd32b738015a347735058-5" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding-bottom: 0px; padding-left: 10px !important; padding-right: 5px; padding-top: 0px;">
<span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">|</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">{</span><span class="crayon-s" style="box-sizing: inherit; color: rgb(0, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">"hire_date"</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">:</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-s" style="box-sizing: inherit; color: rgb(0, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">"1985-01-01"</span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">}</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">|</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">{</span><span class="crayon-s" style="box-sizing: inherit; color: rgb(0, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">"hire_date"</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">:</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-s" style="box-sizing: inherit; color: rgb(0, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">"1985-01-01T00:00:00Z"</span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">}</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">|</span></div>
<div class="crayon-line crayon-striped-line" id="crayon-5bd32b738015a347735058-6" style="background: rgb(249, 249, 249) !important; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding-bottom: 0px; padding-left: 10px !important; padding-right: 5px; padding-top: 0px;">
<span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">+</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">-</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">+</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">--</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">-</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">+</span></div>
<div class="crayon-line" id="crayon-5bd32b738015a347735058-7" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding-bottom: 0px; padding-left: 10px !important; padding-right: 5px; padding-top: 0px;">
<span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">1</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-e" style="box-sizing: inherit; color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">row </span><span class="crayon-st" style="box-sizing: inherit; color: rgb(128, 0, 128) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">in</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-e" style="box-sizing: inherit; color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">set</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">(</span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">0.00</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-v" style="box-sizing: inherit; color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">sec</span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">)</span></div>
</div>
</td></tr>
</tbody></table>
</div>
</div>
<div style="background-color: white; box-sizing: inherit; color: #373a3c; font-family: "Helvetica Neue", Helvetica, Arial, Open-sans, sans-serif; font-size: 13px; line-height: 21px; margin-bottom: 1rem; margin-top: 10px !important;">
Next, we dump the output to a file (the above query is slightly modified) e.g.</div>
<div class="crayon-syntax crayon-theme-familiar crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-5bd32b738015b812216035" style="background-color: white; border-width: 1px !important; box-sizing: border-box; color: #373a3c; direction: ltr !important; font-family: Monaco, MonacoRegular, "Courier New", monospace; font-size: 12px !important; height: auto; line-height: 15px !important; margin: 12px 0px; overflow: hidden !important; padding: 0px; position: relative !important; text-shadow: none !important; text-size-adjust: none; width: 660px;">
<div class="crayon-toolbar" data-settings=" show" style="background: rgb(238, 238, 238) !important; border-bottom: 1px solid rgb(222, 222, 222) !important; border-image: initial; border-left: 0px; border-right: 0px; border-top: 0px; box-sizing: inherit; height: 18px !important; line-height: 18px !important; margin: 0px; overflow: hidden; padding: 0px; position: relative; width: 660px; z-index: 4;">
<span class="crayon-title" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; float: left; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; padding: 0px 4px !important;"></span><div class="crayon-tools" style="background: 0px center; border: 0px; box-sizing: inherit; float: right !important; font-family: inherit; font-weight: inherit !important; height: 18px !important; line-height: 18px !important; margin: 0px; padding: 0px; position: absolute; right: 0px;">
<div class="crayon-button crayon-nums-button crayon-pressed" style="background-attachment: initial; background-clip: initial; background-color: rgb(188, 188, 188) !important; background-image: initial; background-origin: initial; background-position: -24px 0px; background-repeat: no-repeat; background-size: initial; border: 0px; box-sizing: inherit; color: white; display: inline; float: left !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: 15px; margin: 0px; padding: 0px; position: relative; width: 24px;" title="Toggle Line Numbers">
<div class="crayon-button-icon" style="background: url("https://www.percona.com/community-blog/wp-content/plugins/crayon-syntax-highlighter/css/images/toolbar/buttons@2x.png") -24px -32px / 48px 128px; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: 16px !important; left: 0px; line-height: inherit !important; margin: -8px 0px 0px; padding: 0px; position: absolute; top: 9px; width: 24px;">
</div>
</div>
<div class="crayon-button crayon-plain-button" style="background-attachment: initial; background-clip: initial; background-color: transparent !important; background-image: initial; background-origin: initial; background-position: 0px center; background-repeat: no-repeat; background-size: initial; border: 0px; box-sizing: inherit; display: inline; float: left !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: 15px; margin: 0px; padding: 0px; position: relative; width: 24px;" title="Toggle Plain Code">
<div class="crayon-button-icon" style="background: url("https://www.percona.com/community-blog/wp-content/plugins/crayon-syntax-highlighter/css/images/toolbar/buttons@2x.png") 0px -48px / 48px 128px; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: 16px !important; left: 0px; line-height: inherit !important; margin: -8px 0px 0px; padding: 0px; position: absolute; top: 9px; width: 24px;">
</div>
</div>
<div class="crayon-button crayon-wrap-button" style="background-attachment: initial; background-clip: initial; background-color: transparent !important; background-image: initial; background-origin: initial; background-position: 0px center; background-repeat: no-repeat; background-size: initial; border: 0px; box-sizing: inherit; display: inline; float: left !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: 15px; margin: 0px; padding: 0px; position: relative; width: 24px;" title="Toggle Line Wrap">
<div class="crayon-button-icon" style="background: url("https://www.percona.com/community-blog/wp-content/plugins/crayon-syntax-highlighter/css/images/toolbar/buttons@2x.png") 0px -112px / 48px 128px; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: 16px !important; left: 0px; line-height: inherit !important; margin: -8px 0px 0px; padding: 0px; position: absolute; top: 9px; width: 24px;">
</div>
</div>
<div class="crayon-button crayon-expand-button" style="background-attachment: initial; background-clip: initial; background-color: transparent !important; background-image: initial; background-origin: initial; background-position: 0px center; background-repeat: no-repeat; background-size: initial; border: 0px; box-sizing: inherit; display: inline; float: left !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: 15px; margin: 0px; padding: 0px; position: relative; width: 24px;" title="Expand Code">
<div class="crayon-button-icon" style="background: url("https://www.percona.com/community-blog/wp-content/plugins/crayon-syntax-highlighter/css/images/toolbar/buttons@2x.png") 0px -96px / 48px 128px; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: 16px !important; left: 0px; line-height: inherit !important; margin: -8px 0px 0px; padding: 0px; position: absolute; top: 9px; width: 24px;">
</div>
</div>
<div class="crayon-button crayon-copy-button" style="background-attachment: initial; background-clip: initial; background-color: transparent !important; background-image: initial; background-origin: initial; background-position: 0px center; background-repeat: no-repeat; background-size: initial; border: 0px; box-sizing: inherit; display: inline; float: left !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: 15px; margin: 0px; padding: 0px; position: relative; width: 24px;" title="Copy">
<div class="crayon-button-icon" style="background: url("https://www.percona.com/community-blog/wp-content/plugins/crayon-syntax-highlighter/css/images/toolbar/buttons@2x.png") 0px -16px / 48px 128px; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: 16px !important; left: 0px; line-height: inherit !important; margin: -8px 0px 0px; padding: 0px; position: absolute; top: 9px; width: 24px;">
</div>
</div>
<div class="crayon-button crayon-popup-button" style="background-attachment: initial; background-clip: initial; background-color: transparent !important; background-image: initial; background-origin: initial; background-position: 0px center; background-repeat: no-repeat; background-size: initial; border: 0px; box-sizing: inherit; display: inline; float: left !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: 15px; margin: 0px; padding: 0px; position: relative; width: 24px;" title="Open Code In New Window">
<div class="crayon-button-icon" style="background: url("https://www.percona.com/community-blog/wp-content/plugins/crayon-syntax-highlighter/css/images/toolbar/buttons@2x.png") 0px 0px / 48px 128px; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: 16px !important; left: 0px; line-height: inherit !important; margin: -8px 0px 0px; padding: 0px; position: absolute; top: 9px; width: 24px;">
</div>
</div>
<span class="crayon-language" style="box-sizing: inherit; color: rgb(153, 153, 153) !important; float: left; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; padding: 0px 8px 0px 4px !important;">Shell</span></div>
</div>
<div class="crayon-plain-wrap" style="background: 0px center; border: 0px; box-sizing: inherit; height: auto !important; margin: 0px !important; padding: 0px !important;">
<textarea class="crayon-plain print-no" data-settings="click" readonly="" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-color: initial; border-radius: 0px; border-style: initial; border-width: 0px; box-shadow: none; color: black; font-family: Monaco, MonacoRegular, "Courier New", monospace !important; font-size: 12px !important; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; height: 198px; line-height: 15px !important; margin: 0px; max-width: 100%; opacity: 0; overflow-wrap: normal; overflow: hidden; padding-left: 5px; padding-right: 5px; padding-top: 0px; position: absolute; resize: none; tab-size: 4; white-space: pre; width: 660px; z-index: 0;" wrap="soft"></textarea></div>
<div class="crayon-main" style="background: 0px center; border: 0px; box-sizing: inherit; margin: 0px; overflow: hidden; padding: 0px; position: relative; width: 660px; z-index: 1;">
<table class="crayon-table" style="background: none !important; border-collapse: collapse !important; border-spacing: 0px !important; border: none !important; box-sizing: inherit; font-size: 12px; margin-bottom: 0px !important; margin-left: 0px; margin-right: 0px !important; margin-top: 0px !important; padding: 0px !important; table-layout: auto !important; width: auto !important;"><tbody style="box-sizing: inherit;">
<tr class="crayon-row" style="background: 0px center; border: none !important; box-sizing: inherit; margin: 0px !important; padding: 0px !important; vertical-align: top !important;"><td class="crayon-nums " data-settings="show" style="background: 0px center; border-bottom: 0px; border-image: initial; border-left: 0px; border-right: 3px solid rgb(108, 226, 108) !important; border-top: 0px; box-sizing: inherit; color: rgb(175, 175, 175) !important; margin: 0px !important; padding: 0px 5px 0px 0px !important; vertical-align: top !important;"><div class="crayon-nums-content" style="background: 0px center; border: 0px; box-sizing: inherit; line-height: 15px !important; margin: 0px; padding: 0px; white-space: nowrap;">
<div class="crayon-num" data-line="crayon-5bd32b738015b812216035-1" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
1</div>
<div class="crayon-num crayon-striped-num" data-line="crayon-5bd32b738015b812216035-2" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
2</div>
<div class="crayon-num" data-line="crayon-5bd32b738015b812216035-3" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
3</div>
<div class="crayon-num crayon-striped-num" data-line="crayon-5bd32b738015b812216035-4" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
4</div>
<div class="crayon-num" data-line="crayon-5bd32b738015b812216035-5" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
5</div>
<div class="crayon-num crayon-striped-num" data-line="crayon-5bd32b738015b812216035-6" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
6</div>
<div class="crayon-num" data-line="crayon-5bd32b738015b812216035-7" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
7</div>
<div class="crayon-num crayon-striped-num" data-line="crayon-5bd32b738015b812216035-8" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
8</div>
<div class="crayon-num" data-line="crayon-5bd32b738015b812216035-9" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
9</div>
<div class="crayon-num crayon-striped-num" data-line="crayon-5bd32b738015b812216035-10" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
10</div>
<div class="crayon-num" data-line="crayon-5bd32b738015b812216035-11" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
11</div>
<div class="crayon-num crayon-striped-num" data-line="crayon-5bd32b738015b812216035-12" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
12</div>
</div>
</td><td class="crayon-code" style="background: 0px center; border: 0px; box-sizing: inherit; margin: 0px !important; padding: 0px !important; vertical-align: top !important; width: 945.5px;"><div class="crayon-pre" style="background: none !important; border: none !important; box-sizing: inherit; line-height: 15px !important; margin: 0px; overflow: visible; padding: 0px; tab-size: 4; white-space: pre;">
<div class="crayon-line" id="crayon-5bd32b738015b812216035-1" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding-bottom: 0px; padding-left: 10px !important; padding-right: 5px; padding-top: 0px;">
<span class="crayon-e" style="box-sizing: inherit; color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">SELECT </span><span class="crayon-e" style="box-sizing: inherit; color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">json_object</span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">(</span></div>
<div class="crayon-line crayon-striped-line" id="crayon-5bd32b738015b812216035-2" style="background: rgb(249, 249, 249) !important; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding-bottom: 0px; padding-left: 10px !important; padding-right: 5px; padding-top: 0px;">
<span class="crayon-s" style="box-sizing: inherit; color: rgb(0, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">'emp_no'</span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">,</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-v" style="box-sizing: inherit; color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">emp</span><span class="crayon-e" style="box-sizing: inherit; color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">.emp_no</span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">,</span></div>
<div class="crayon-line" id="crayon-5bd32b738015b812216035-3" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding-bottom: 0px; padding-left: 10px !important; padding-right: 5px; padding-top: 0px;">
<span class="crayon-s" style="box-sizing: inherit; color: rgb(0, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">'first_name'</span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">,</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-v" style="box-sizing: inherit; color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">emp</span><span class="crayon-e" style="box-sizing: inherit; color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">.first_name</span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">,</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span></div>
<div class="crayon-line crayon-striped-line" id="crayon-5bd32b738015b812216035-4" style="background: rgb(249, 249, 249) !important; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding-bottom: 0px; padding-left: 10px !important; padding-right: 5px; padding-top: 0px;">
<span class="crayon-s" style="box-sizing: inherit; color: rgb(0, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">'last_name'</span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">,</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-v" style="box-sizing: inherit; color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">emp</span><span class="crayon-e" style="box-sizing: inherit; color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">.last_name</span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">,</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span></div>
<div class="crayon-line" id="crayon-5bd32b738015b812216035-5" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding-bottom: 0px; padding-left: 10px !important; padding-right: 5px; padding-top: 0px;">
<span class="crayon-s" style="box-sizing: inherit; color: rgb(0, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">'hire_date'</span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">,</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-e" style="box-sizing: inherit; color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">json_object</span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">(</span><span class="crayon-s" style="box-sizing: inherit; color: rgb(0, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">"$date"</span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">,</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-e" style="box-sizing: inherit; color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">DATE_FORMAT</span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">(</span><span class="crayon-v" style="box-sizing: inherit; color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">emp</span><span class="crayon-e" style="box-sizing: inherit; color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">.hire_date</span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">,</span><span class="crayon-s" style="box-sizing: inherit; color: rgb(0, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">'%Y-%m-%dT%TZ'</span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">)</span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">)</span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">,</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span></div>
<div class="crayon-line crayon-striped-line" id="crayon-5bd32b738015b812216035-6" style="background: rgb(249, 249, 249) !important; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding-bottom: 0px; padding-left: 10px !important; padding-right: 5px; padding-top: 0px;">
<span class="crayon-s" style="box-sizing: inherit; color: rgb(0, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">'Department'</span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">,</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-e" style="box-sizing: inherit; color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">JSON_ARRAY</span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">(</span><span class="crayon-e" style="box-sizing: inherit; color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">json_object</span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">(</span><span class="crayon-s" style="box-sizing: inherit; color: rgb(0, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">'dept_id'</span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">,</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-v" style="box-sizing: inherit; color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">dept</span><span class="crayon-e" style="box-sizing: inherit; color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">.dept_no</span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">,</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-s" style="box-sizing: inherit; color: rgb(0, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">'dept_name'</span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">,</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-v" style="box-sizing: inherit; color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">dept</span><span class="crayon-e" style="box-sizing: inherit; color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">.dept_name</span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">)</span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">)</span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">,</span></div>
<div class="crayon-line" id="crayon-5bd32b738015b812216035-7" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding-bottom: 0px; padding-left: 10px !important; padding-right: 5px; padding-top: 0px;">
<span class="crayon-s" style="box-sizing: inherit; color: rgb(0, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">'Salary'</span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">,</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-v" style="box-sizing: inherit; color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">s</span><span class="crayon-e" style="box-sizing: inherit; color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">.salary</span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">)</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-st" style="box-sizing: inherit; color: rgb(128, 0, 128) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">as</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-s" style="box-sizing: inherit; color: rgb(0, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">'json'</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span></div>
<div class="crayon-line crayon-striped-line" id="crayon-5bd32b738015b812216035-8" style="background: rgb(249, 249, 249) !important; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding-bottom: 0px; padding-left: 10px !important; padding-right: 5px; padding-top: 0px;">
<span class="crayon-e" style="box-sizing: inherit; color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">INTO </span><span class="crayon-i" style="box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">OUTFILE</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-s" style="box-sizing: inherit; color: rgb(0, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">'C:/ProgramData/MySQL/MySQL Server 8.0/Uploads/employees.json'</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-c" style="box-sizing: inherit; color: rgb(255, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">## IMPORTANT you may want to adjust outfile path here</span></div>
<div class="crayon-line" id="crayon-5bd32b738015b812216035-9" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding-bottom: 0px; padding-left: 10px !important; padding-right: 5px; padding-top: 0px;">
<span class="crayon-e" style="box-sizing: inherit; color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">FROM </span><span class="crayon-e" style="box-sizing: inherit; color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">employees </span><span class="crayon-e" style="box-sizing: inherit; color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">emp</span></div>
<div class="crayon-line crayon-striped-line" id="crayon-5bd32b738015b812216035-10" style="background: rgb(249, 249, 249) !important; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding-bottom: 0px; padding-left: 10px !important; padding-right: 5px; padding-top: 0px;">
<span class="crayon-e" style="box-sizing: inherit; color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">INNER </span><span class="crayon-r" style="box-sizing: inherit; color: rgb(128, 0, 128) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">JOIN</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-i" style="box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">salaries</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-i" style="box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">s</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-i" style="box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">ON</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-v" style="box-sizing: inherit; color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">s</span><span class="crayon-e" style="box-sizing: inherit; color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">.emp_no</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">=</span><span class="crayon-v" style="box-sizing: inherit; color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">emp</span><span class="crayon-e" style="box-sizing: inherit; color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">.emp_no</span></div>
<div class="crayon-line" id="crayon-5bd32b738015b812216035-11" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding-bottom: 0px; padding-left: 10px !important; padding-right: 5px; padding-top: 0px;">
<span class="crayon-e" style="box-sizing: inherit; color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">INNER </span><span class="crayon-r" style="box-sizing: inherit; color: rgb(128, 0, 128) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">JOIN</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-v" style="box-sizing: inherit; color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">current_dept</span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">_</span>emp<span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-i" style="box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">c</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-i" style="box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">on</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-v" style="box-sizing: inherit; color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">c</span><span class="crayon-e" style="box-sizing: inherit; color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">.emp_no</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">=</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-v" style="box-sizing: inherit; color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">emp</span><span class="crayon-e" style="box-sizing: inherit; color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">.emp_no</span></div>
<div class="crayon-line crayon-striped-line" id="crayon-5bd32b738015b812216035-12" style="background: rgb(249, 249, 249) !important; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding-bottom: 0px; padding-left: 10px !important; padding-right: 5px; padding-top: 0px;">
<span class="crayon-e" style="box-sizing: inherit; color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">INNER </span><span class="crayon-r" style="box-sizing: inherit; color: rgb(128, 0, 128) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">JOIN</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-e" style="box-sizing: inherit; color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">departments </span><span class="crayon-e" style="box-sizing: inherit; color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">dept </span><span class="crayon-e" style="box-sizing: inherit; color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">on </span><span class="crayon-v" style="box-sizing: inherit; color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">dept</span><span class="crayon-e" style="box-sizing: inherit; color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">.dept_no</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">=</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-v" style="box-sizing: inherit; color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">c</span><span class="crayon-e" style="box-sizing: inherit; color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">.dept_no</span></div>
</div>
</td></tr>
</tbody></table>
</div>
</div>
<div style="background-color: white; box-sizing: inherit; color: #373a3c; font-family: "Helvetica Neue", Helvetica, Arial, Open-sans, sans-serif; font-size: 13px; line-height: 21px; margin-bottom: 1rem; margin-top: 10px !important;">
</div>
<h2 style="background-color: white; box-sizing: inherit; color: #373a3c; font-family: "Helvetica Neue", Helvetica, Arial, Open-sans, sans-serif; font-size: 24px !important; line-height: 36px; margin-bottom: 0.5rem; margin-top: 0px;">
Importing data</h2>
<div style="background-color: white; box-sizing: inherit; color: #373a3c; font-family: "Helvetica Neue", Helvetica, Arial, Open-sans, sans-serif; font-size: 13px; line-height: 21px; margin-bottom: 1rem; margin-top: 10px !important;">
To load the file <span class="crayon-syntax crayon-syntax-inline crayon-theme-familiar crayon-theme-familiar-inline crayon-font-monaco" id="crayon-5bd32b738015d315005094" style="background: rgb(250, 250, 250) !important; border-color: rgb(221, 221, 221) !important; border-style: solid !important; border-width: 1px !important; box-sizing: border-box; direction: ltr !important; font-family: Monaco, MonacoRegular, "Courier New", monospace; font-size: 12px !important; line-height: 15px !important; margin: 0px 2px; overflow: hidden !important; padding: 0px 2px; position: relative !important; text-shadow: none !important; text-size-adjust: none; width: 100%;"><span class="crayon-pre crayon-code" style="background: none !important; border: none !important; box-sizing: inherit; color: black; line-height: 15px !important; margin: 0px; overflow: visible; padding: 0px; tab-size: 4; width: 100%;"><span class="crayon-v" style="box-sizing: inherit; color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">employees</span><span class="crayon-e" style="box-sizing: inherit; color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">.json</span></span></span> into MongoDB, I use the <code style="background-color: #f7f7f9; border-radius: 0.25rem; box-sizing: inherit; color: #bd4147; font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 11.7px; padding: 0.2rem 0.4rem;"><a href="https://docs.mongodb.com/manual/reference/program/mongoimport/" style="background-color: transparent; box-sizing: inherit; color: #bf3119; font-family: "Open Sans", sans-serif; text-decoration-line: none; transition: all 0.25s ease-in-out 0s;" target="_blank">mongoimport</a></code> utility. It’s a multi-threaded tool that can load large files efficiently.</div>
<div class="crayon-syntax crayon-theme-familiar crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-5bd32b738015e961043354" style="background-color: white; border-width: 1px !important; box-sizing: border-box; color: #373a3c; direction: ltr !important; font-family: Monaco, MonacoRegular, "Courier New", monospace; font-size: 12px !important; height: auto; line-height: 15px !important; margin: 12px 0px; overflow: hidden !important; padding: 0px; position: relative !important; text-shadow: none !important; text-size-adjust: none; width: 660px;">
<div class="crayon-toolbar" data-settings=" show" style="background: rgb(238, 238, 238) !important; border-bottom: 1px solid rgb(222, 222, 222) !important; border-image: initial; border-left: 0px; border-right: 0px; border-top: 0px; box-sizing: inherit; height: 18px !important; line-height: 18px !important; margin: 0px; overflow: hidden; padding: 0px; position: relative; width: 660px; z-index: 4;">
<span class="crayon-title" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; float: left; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; padding: 0px 4px !important;"></span><div class="crayon-tools" style="background: 0px center; border: 0px; box-sizing: inherit; float: right !important; font-family: inherit; font-weight: inherit !important; height: 18px !important; line-height: 18px !important; margin: 0px; padding: 0px; position: absolute; right: 0px;">
<div class="crayon-button crayon-nums-button crayon-pressed" style="background-attachment: initial; background-clip: initial; background-color: rgb(188, 188, 188) !important; background-image: initial; background-origin: initial; background-position: -24px 0px; background-repeat: no-repeat; background-size: initial; border: 0px; box-sizing: inherit; color: white; display: inline; float: left !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: 15px; margin: 0px; padding: 0px; position: relative; width: 24px;" title="Toggle Line Numbers">
<div class="crayon-button-icon" style="background: url("https://www.percona.com/community-blog/wp-content/plugins/crayon-syntax-highlighter/css/images/toolbar/buttons@2x.png") -24px -32px / 48px 128px; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: 16px !important; left: 0px; line-height: inherit !important; margin: -8px 0px 0px; padding: 0px; position: absolute; top: 9px; width: 24px;">
</div>
</div>
<div class="crayon-button crayon-plain-button" style="background-attachment: initial; background-clip: initial; background-color: transparent !important; background-image: initial; background-origin: initial; background-position: 0px center; background-repeat: no-repeat; background-size: initial; border: 0px; box-sizing: inherit; display: inline; float: left !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: 15px; margin: 0px; padding: 0px; position: relative; width: 24px;" title="Toggle Plain Code">
<div class="crayon-button-icon" style="background: url("https://www.percona.com/community-blog/wp-content/plugins/crayon-syntax-highlighter/css/images/toolbar/buttons@2x.png") 0px -48px / 48px 128px; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: 16px !important; left: 0px; line-height: inherit !important; margin: -8px 0px 0px; padding: 0px; position: absolute; top: 9px; width: 24px;">
</div>
</div>
<div class="crayon-button crayon-wrap-button" style="background-attachment: initial; background-clip: initial; background-color: transparent !important; background-image: initial; background-origin: initial; background-position: 0px center; background-repeat: no-repeat; background-size: initial; border: 0px; box-sizing: inherit; display: inline; float: left !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: 15px; margin: 0px; padding: 0px; position: relative; width: 24px;" title="Toggle Line Wrap">
<div class="crayon-button-icon" style="background: url("https://www.percona.com/community-blog/wp-content/plugins/crayon-syntax-highlighter/css/images/toolbar/buttons@2x.png") 0px -112px / 48px 128px; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: 16px !important; left: 0px; line-height: inherit !important; margin: -8px 0px 0px; padding: 0px; position: absolute; top: 9px; width: 24px;">
</div>
</div>
<div class="crayon-button crayon-copy-button" style="background-attachment: initial; background-clip: initial; background-color: transparent !important; background-image: initial; background-origin: initial; background-position: 0px center; background-repeat: no-repeat; background-size: initial; border: 0px; box-sizing: inherit; display: inline; float: left !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: 15px; margin: 0px; padding: 0px; position: relative; width: 24px;" title="Copy">
<div class="crayon-button-icon" style="background: url("https://www.percona.com/community-blog/wp-content/plugins/crayon-syntax-highlighter/css/images/toolbar/buttons@2x.png") 0px -16px / 48px 128px; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: 16px !important; left: 0px; line-height: inherit !important; margin: -8px 0px 0px; padding: 0px; position: absolute; top: 9px; width: 24px;">
</div>
</div>
<div class="crayon-button crayon-popup-button" style="background-attachment: initial; background-clip: initial; background-color: transparent !important; background-image: initial; background-origin: initial; background-position: 0px center; background-repeat: no-repeat; background-size: initial; border: 0px; box-sizing: inherit; display: inline; float: left !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: 15px; margin: 0px; padding: 0px; position: relative; width: 24px;" title="Open Code In New Window">
<div class="crayon-button-icon" style="background: url("https://www.percona.com/community-blog/wp-content/plugins/crayon-syntax-highlighter/css/images/toolbar/buttons@2x.png") 0px 0px / 48px 128px; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: 16px !important; left: 0px; line-height: inherit !important; margin: -8px 0px 0px; padding: 0px; position: absolute; top: 9px; width: 24px;">
</div>
</div>
<span class="crayon-language" style="box-sizing: inherit; color: rgb(153, 153, 153) !important; float: left; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; padding: 0px 8px 0px 4px !important;">Shell</span></div>
</div>
<div class="crayon-plain-wrap" style="background: 0px center; border: 0px; box-sizing: inherit; height: auto !important; margin: 0px !important; padding: 0px !important;">
<textarea class="crayon-plain print-no" data-settings="click" readonly="" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-color: initial; border-radius: 0px; border-style: initial; border-width: 0px; box-shadow: none; color: black; font-family: Monaco, MonacoRegular, "Courier New", monospace !important; font-size: 12px !important; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; height: 333px; line-height: 15px !important; margin: 0px; max-width: 100%; opacity: 0; overflow-wrap: normal; overflow: hidden; padding-left: 5px; padding-right: 5px; padding-top: 0px; position: absolute; resize: none; tab-size: 4; white-space: pre; width: 660px; z-index: 0;" wrap="soft"></textarea></div>
<div class="crayon-main" style="background: 0px center; border: 0px; box-sizing: inherit; margin: 0px; overflow: hidden; padding: 0px; position: relative; width: 660px; z-index: 1;">
<table class="crayon-table" style="background: none !important; border-collapse: collapse !important; border-spacing: 0px !important; border: none !important; box-sizing: inherit; font-size: 12px; margin-bottom: 0px !important; margin-left: 0px; margin-right: 0px !important; margin-top: 0px !important; padding: 0px !important; table-layout: auto !important; width: auto !important;"><tbody style="box-sizing: inherit;">
<tr class="crayon-row" style="background: 0px center; border: none !important; box-sizing: inherit; margin: 0px !important; padding: 0px !important; vertical-align: top !important;"><td class="crayon-nums " data-settings="show" style="background: 0px center; border-bottom: 0px; border-image: initial; border-left: 0px; border-right: 3px solid rgb(108, 226, 108) !important; border-top: 0px; box-sizing: inherit; color: rgb(175, 175, 175) !important; margin: 0px !important; padding: 0px 5px 0px 0px !important; vertical-align: top !important;"><div class="crayon-nums-content" style="background: 0px center; border: 0px; box-sizing: inherit; line-height: 15px !important; margin: 0px; padding: 0px; white-space: nowrap;">
<div class="crayon-num" data-line="crayon-5bd32b738015e961043354-1" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
1</div>
<div class="crayon-num crayon-striped-num" data-line="crayon-5bd32b738015e961043354-2" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
2</div>
<div class="crayon-num" data-line="crayon-5bd32b738015e961043354-3" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
3</div>
<div class="crayon-num crayon-striped-num" data-line="crayon-5bd32b738015e961043354-4" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
4</div>
<div class="crayon-num" data-line="crayon-5bd32b738015e961043354-5" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
5</div>
<div class="crayon-num crayon-striped-num" data-line="crayon-5bd32b738015e961043354-6" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
6</div>
<div class="crayon-num" data-line="crayon-5bd32b738015e961043354-7" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
7</div>
<div class="crayon-num crayon-striped-num" data-line="crayon-5bd32b738015e961043354-8" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
8</div>
<div class="crayon-num" data-line="crayon-5bd32b738015e961043354-9" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
9</div>
<div class="crayon-num crayon-striped-num" data-line="crayon-5bd32b738015e961043354-10" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
10</div>
<div class="crayon-num" data-line="crayon-5bd32b738015e961043354-11" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
11</div>
<div class="crayon-num crayon-striped-num" data-line="crayon-5bd32b738015e961043354-12" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
12</div>
<div class="crayon-num" data-line="crayon-5bd32b738015e961043354-13" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
13</div>
<div class="crayon-num crayon-striped-num" data-line="crayon-5bd32b738015e961043354-14" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
14</div>
<div class="crayon-num" data-line="crayon-5bd32b738015e961043354-15" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
15</div>
<div class="crayon-num crayon-striped-num" data-line="crayon-5bd32b738015e961043354-16" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
16</div>
<div class="crayon-num" data-line="crayon-5bd32b738015e961043354-17" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
17</div>
<div class="crayon-num crayon-striped-num" data-line="crayon-5bd32b738015e961043354-18" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
18</div>
<div class="crayon-num" data-line="crayon-5bd32b738015e961043354-19" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
19</div>
<div class="crayon-num crayon-striped-num" data-line="crayon-5bd32b738015e961043354-20" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
20</div>
<div class="crayon-num" data-line="crayon-5bd32b738015e961043354-21" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
21</div>
</div>
</td><td class="crayon-code" style="background: 0px center; border: 0px; box-sizing: inherit; margin: 0px !important; padding: 0px !important; vertical-align: top !important; width: 629px;"><div class="crayon-pre" style="background: none !important; border: none !important; box-sizing: inherit; line-height: 15px !important; margin: 0px; overflow: visible; padding: 0px; tab-size: 4; white-space: pre;">
<div class="crayon-line" id="crayon-5bd32b738015e961043354-1" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding-bottom: 0px; padding-left: 10px !important; padding-right: 5px; padding-top: 0px;">
<span class="crayon-c" style="box-sizing: inherit; color: rgb(255, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"># mongoimport --db test --collection employees --drop < employees.json</span></div>
<div class="crayon-line crayon-striped-line" id="crayon-5bd32b738015e961043354-2" style="background: rgb(249, 249, 249) !important; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding-bottom: 0px; padding-left: 10px !important; padding-right: 5px; padding-top: 0px;">
<span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">2018</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">-</span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">10</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">-</span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">05T12</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">:</span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">32</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">:</span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">30.401</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">+</span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">0100</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-e" style="box-sizing: inherit; color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">connected </span><span class="crayon-st" style="box-sizing: inherit; color: rgb(128, 0, 128) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">to</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">:</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-i" style="box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">localhost</span></div>
<div class="crayon-line" id="crayon-5bd32b738015e961043354-3" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding-bottom: 0px; padding-left: 10px !important; padding-right: 5px; padding-top: 0px;">
<span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">2018</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">-</span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">10</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">-</span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">05T12</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">:</span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">32</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">:</span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">30.401</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">+</span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">0100</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-v" style="box-sizing: inherit; color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">dropping</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">:</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-r" style="box-sizing: inherit; color: rgb(128, 0, 128) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">test</span><span class="crayon-e" style="box-sizing: inherit; color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">.employees</span></div>
<div class="crayon-line crayon-striped-line" id="crayon-5bd32b738015e961043354-4" style="background: rgb(249, 249, 249) !important; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding-bottom: 0px; padding-left: 10px !important; padding-right: 5px; padding-top: 0px;">
<span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">2018</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">-</span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">10</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">-</span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">05T12</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">:</span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">32</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">:</span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">33.400</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">+</span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">0100</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-r" style="box-sizing: inherit; color: rgb(128, 0, 128) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">test</span><span class="crayon-e" style="box-sizing: inherit; color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">.employees</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">34.0MB</span></div>
<div class="crayon-line" id="crayon-5bd32b738015e961043354-5" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding-bottom: 0px; padding-left: 10px !important; padding-right: 5px; padding-top: 0px;">
<span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">2018</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">-</span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">10</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">-</span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">05T12</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">:</span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">32</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">:</span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">36.401</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">+</span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">0100</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-r" style="box-sizing: inherit; color: rgb(128, 0, 128) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">test</span><span class="crayon-e" style="box-sizing: inherit; color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">.employees</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">67.3MB</span></div>
<div class="crayon-line crayon-striped-line" id="crayon-5bd32b738015e961043354-6" style="background: rgb(249, 249, 249) !important; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding-bottom: 0px; padding-left: 10px !important; padding-right: 5px; padding-top: 0px;">
<span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">2018</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">-</span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">10</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">-</span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">05T12</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">:</span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">32</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">:</span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">39.399</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">+</span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">0100</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-r" style="box-sizing: inherit; color: rgb(128, 0, 128) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">test</span><span class="crayon-e" style="box-sizing: inherit; color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">.employees</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">100MB</span></div>
<div class="crayon-line" id="crayon-5bd32b738015e961043354-7" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding-bottom: 0px; padding-left: 10px !important; padding-right: 5px; padding-top: 0px;">
<span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">2018</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">-</span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">10</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">-</span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">05T12</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">:</span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">32</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">:</span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">42.400</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">+</span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">0100</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-r" style="box-sizing: inherit; color: rgb(128, 0, 128) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">test</span><span class="crayon-e" style="box-sizing: inherit; color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">.employees</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">134MB</span></div>
<div class="crayon-line crayon-striped-line" id="crayon-5bd32b738015e961043354-8" style="background: rgb(249, 249, 249) !important; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding-bottom: 0px; padding-left: 10px !important; padding-right: 5px; padding-top: 0px;">
<span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">2018</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">-</span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">10</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">-</span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">05T12</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">:</span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">32</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">:</span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">45.401</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">+</span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">0100</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-r" style="box-sizing: inherit; color: rgb(128, 0, 128) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">test</span><span class="crayon-e" style="box-sizing: inherit; color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">.employees</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">168MB</span></div>
<div class="crayon-line" id="crayon-5bd32b738015e961043354-9" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding-bottom: 0px; padding-left: 10px !important; padding-right: 5px; padding-top: 0px;">
<span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">2018</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">-</span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">10</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">-</span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">05T12</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">:</span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">32</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">:</span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">48.402</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">+</span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">0100</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-r" style="box-sizing: inherit; color: rgb(128, 0, 128) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">test</span><span class="crayon-e" style="box-sizing: inherit; color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">.employees</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">202MB</span></div>
<div class="crayon-line crayon-striped-line" id="crayon-5bd32b738015e961043354-10" style="background: rgb(249, 249, 249) !important; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding-bottom: 0px; padding-left: 10px !important; padding-right: 5px; padding-top: 0px;">
<span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">2018</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">-</span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">10</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">-</span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">05T12</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">:</span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">32</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">:</span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">51.402</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">+</span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">0100</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-r" style="box-sizing: inherit; color: rgb(128, 0, 128) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">test</span><span class="crayon-e" style="box-sizing: inherit; color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">.employees</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">235MB</span></div>
<div class="crayon-line" id="crayon-5bd32b738015e961043354-11" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding-bottom: 0px; padding-left: 10px !important; padding-right: 5px; padding-top: 0px;">
<span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">2018</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">-</span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">10</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">-</span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">05T12</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">:</span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">32</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">:</span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">54.400</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">+</span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">0100</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-r" style="box-sizing: inherit; color: rgb(128, 0, 128) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">test</span><span class="crayon-e" style="box-sizing: inherit; color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">.employees</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">269MB</span></div>
<div class="crayon-line crayon-striped-line" id="crayon-5bd32b738015e961043354-12" style="background: rgb(249, 249, 249) !important; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding-bottom: 0px; padding-left: 10px !important; padding-right: 5px; padding-top: 0px;">
<span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">2018</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">-</span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">10</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">-</span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">05T12</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">:</span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">32</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">:</span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">57.400</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">+</span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">0100</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-r" style="box-sizing: inherit; color: rgb(128, 0, 128) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">test</span><span class="crayon-e" style="box-sizing: inherit; color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">.employees</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">303MB</span></div>
<div class="crayon-line" id="crayon-5bd32b738015e961043354-13" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding-bottom: 0px; padding-left: 10px !important; padding-right: 5px; padding-top: 0px;">
<span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">2018</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">-</span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">10</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">-</span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">05T12</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">:</span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">33</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">:</span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">00.403</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">+</span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">0100</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-r" style="box-sizing: inherit; color: rgb(128, 0, 128) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">test</span><span class="crayon-e" style="box-sizing: inherit; color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">.employees</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">335MB</span></div>
<div class="crayon-line crayon-striped-line" id="crayon-5bd32b738015e961043354-14" style="background: rgb(249, 249, 249) !important; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding-bottom: 0px; padding-left: 10px !important; padding-right: 5px; padding-top: 0px;">
<span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">2018</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">-</span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">10</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">-</span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">05T12</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">:</span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">33</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">:</span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">03.404</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">+</span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">0100</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-r" style="box-sizing: inherit; color: rgb(128, 0, 128) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">test</span><span class="crayon-e" style="box-sizing: inherit; color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">.employees</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">368MB</span></div>
<div class="crayon-line" id="crayon-5bd32b738015e961043354-15" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding-bottom: 0px; padding-left: 10px !important; padding-right: 5px; padding-top: 0px;">
<span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">2018</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">-</span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">10</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">-</span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">05T12</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">:</span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">33</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">:</span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">06.399</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">+</span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">0100</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-r" style="box-sizing: inherit; color: rgb(128, 0, 128) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">test</span><span class="crayon-e" style="box-sizing: inherit; color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">.employees</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">397MB</span></div>
<div class="crayon-line crayon-striped-line" id="crayon-5bd32b738015e961043354-16" style="background: rgb(249, 249, 249) !important; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding-bottom: 0px; padding-left: 10px !important; padding-right: 5px; padding-top: 0px;">
<span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">2018</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">-</span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">10</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">-</span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">05T12</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">:</span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">33</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">:</span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">09.400</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">+</span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">0100</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-r" style="box-sizing: inherit; color: rgb(128, 0, 128) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">test</span><span class="crayon-e" style="box-sizing: inherit; color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">.employees</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">430MB</span></div>
<div class="crayon-line" id="crayon-5bd32b738015e961043354-17" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding-bottom: 0px; padding-left: 10px !important; padding-right: 5px; padding-top: 0px;">
<span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">2018</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">-</span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">10</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">-</span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">05T12</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">:</span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">33</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">:</span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">12.400</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">+</span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">0100</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-r" style="box-sizing: inherit; color: rgb(128, 0, 128) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">test</span><span class="crayon-e" style="box-sizing: inherit; color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">.employees</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">465MB</span></div>
<div class="crayon-line crayon-striped-line" id="crayon-5bd32b738015e961043354-18" style="background: rgb(249, 249, 249) !important; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding-bottom: 0px; padding-left: 10px !important; padding-right: 5px; padding-top: 0px;">
<span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">2018</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">-</span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">10</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">-</span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">05T12</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">:</span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">33</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">:</span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">15.403</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">+</span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">0100</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-r" style="box-sizing: inherit; color: rgb(128, 0, 128) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">test</span><span class="crayon-e" style="box-sizing: inherit; color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">.employees</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">499MB</span></div>
<div class="crayon-line" id="crayon-5bd32b738015e961043354-19" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding-bottom: 0px; padding-left: 10px !important; padding-right: 5px; padding-top: 0px;">
<span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">2018</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">-</span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">10</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">-</span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">05T12</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">:</span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">33</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">:</span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">18.401</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">+</span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">0100</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-r" style="box-sizing: inherit; color: rgb(128, 0, 128) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">test</span><span class="crayon-e" style="box-sizing: inherit; color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">.employees</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">530MB</span></div>
<div class="crayon-line crayon-striped-line" id="crayon-5bd32b738015e961043354-20" style="background: rgb(249, 249, 249) !important; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding-bottom: 0px; padding-left: 10px !important; padding-right: 5px; padding-top: 0px;">
<span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">2018</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">-</span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">10</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">-</span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">05T12</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">:</span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">33</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">:</span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">18.589</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">+</span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">0100</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-r" style="box-sizing: inherit; color: rgb(128, 0, 128) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">test</span><span class="crayon-e" style="box-sizing: inherit; color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">.employees</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">533MB</span></div>
<div class="crayon-line" id="crayon-5bd32b738015e961043354-21" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding-bottom: 0px; padding-left: 10px !important; padding-right: 5px; padding-top: 0px;">
<span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">2018</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">-</span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">10</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">-</span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">05T12</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">:</span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">33</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">:</span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">18.589</span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">+</span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">0100</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-i" style="box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">imported</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">2844047</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-v" style="box-sizing: inherit; color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">documents</span></div>
</div>
</td></tr>
</tbody></table>
</div>
</div>
<div style="background-color: white; box-sizing: inherit; color: #373a3c; font-family: "Helvetica Neue", Helvetica, Arial, Open-sans, sans-serif; font-size: 13px; line-height: 21px; margin-bottom: 1rem; margin-top: 10px !important;">
</div>
<h2 style="background-color: white; box-sizing: inherit; color: #373a3c; font-family: "Helvetica Neue", Helvetica, Arial, Open-sans, sans-serif; font-size: 24px !important; line-height: 36px; margin-bottom: 0.5rem; margin-top: 0px;">
Validate</h2>
<div style="background-color: white; box-sizing: inherit; color: #373a3c; font-family: "Helvetica Neue", Helvetica, Arial, Open-sans, sans-serif; font-size: 13px; line-height: 21px; margin-bottom: 1rem; margin-top: 10px !important;">
</div>
<div class="crayon-syntax crayon-theme-familiar crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-5bd32b738015f292952802" style="background-color: white; border-width: 1px !important; box-sizing: border-box; color: #373a3c; direction: ltr !important; font-family: Monaco, MonacoRegular, "Courier New", monospace; font-size: 12px !important; height: auto; line-height: 15px !important; margin: 12px 0px; overflow: hidden !important; padding: 0px; position: relative !important; text-shadow: none !important; text-size-adjust: none; width: 660px;">
<div class="crayon-toolbar" data-settings=" show" style="background: rgb(238, 238, 238) !important; border-bottom: 1px solid rgb(222, 222, 222) !important; border-image: initial; border-left: 0px; border-right: 0px; border-top: 0px; box-sizing: inherit; height: 18px !important; line-height: 18px !important; margin: 0px; overflow: hidden; padding: 0px; position: relative; width: 660px; z-index: 4;">
<span class="crayon-title" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; float: left; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; padding: 0px 4px !important;"></span><div class="crayon-tools" style="background: 0px center; border: 0px; box-sizing: inherit; float: right !important; font-family: inherit; font-weight: inherit !important; height: 18px !important; line-height: 18px !important; margin: 0px; padding: 0px; position: absolute; right: 0px;">
<div class="crayon-button crayon-nums-button crayon-pressed" style="background-attachment: initial; background-clip: initial; background-color: rgb(188, 188, 188) !important; background-image: initial; background-origin: initial; background-position: -24px 0px; background-repeat: no-repeat; background-size: initial; border: 0px; box-sizing: inherit; color: white; display: inline; float: left !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: 15px; margin: 0px; padding: 0px; position: relative; width: 24px;" title="Toggle Line Numbers">
<div class="crayon-button-icon" style="background: url("https://www.percona.com/community-blog/wp-content/plugins/crayon-syntax-highlighter/css/images/toolbar/buttons@2x.png") -24px -32px / 48px 128px; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: 16px !important; left: 0px; line-height: inherit !important; margin: -8px 0px 0px; padding: 0px; position: absolute; top: 9px; width: 24px;">
</div>
</div>
<div class="crayon-button crayon-plain-button" style="background-attachment: initial; background-clip: initial; background-color: transparent !important; background-image: initial; background-origin: initial; background-position: 0px center; background-repeat: no-repeat; background-size: initial; border: 0px; box-sizing: inherit; display: inline; float: left !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: 15px; margin: 0px; padding: 0px; position: relative; width: 24px;" title="Toggle Plain Code">
<div class="crayon-button-icon" style="background: url("https://www.percona.com/community-blog/wp-content/plugins/crayon-syntax-highlighter/css/images/toolbar/buttons@2x.png") 0px -48px / 48px 128px; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: 16px !important; left: 0px; line-height: inherit !important; margin: -8px 0px 0px; padding: 0px; position: absolute; top: 9px; width: 24px;">
</div>
</div>
<div class="crayon-button crayon-wrap-button" style="background-attachment: initial; background-clip: initial; background-color: transparent !important; background-image: initial; background-origin: initial; background-position: 0px center; background-repeat: no-repeat; background-size: initial; border: 0px; box-sizing: inherit; display: inline; float: left !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: 15px; margin: 0px; padding: 0px; position: relative; width: 24px;" title="Toggle Line Wrap">
<div class="crayon-button-icon" style="background: url("https://www.percona.com/community-blog/wp-content/plugins/crayon-syntax-highlighter/css/images/toolbar/buttons@2x.png") 0px -112px / 48px 128px; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: 16px !important; left: 0px; line-height: inherit !important; margin: -8px 0px 0px; padding: 0px; position: absolute; top: 9px; width: 24px;">
</div>
</div>
<div class="crayon-button crayon-copy-button" style="background-attachment: initial; background-clip: initial; background-color: transparent !important; background-image: initial; background-origin: initial; background-position: 0px center; background-repeat: no-repeat; background-size: initial; border: 0px; box-sizing: inherit; display: inline; float: left !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: 15px; margin: 0px; padding: 0px; position: relative; width: 24px;" title="Copy">
<div class="crayon-button-icon" style="background: url("https://www.percona.com/community-blog/wp-content/plugins/crayon-syntax-highlighter/css/images/toolbar/buttons@2x.png") 0px -16px / 48px 128px; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: 16px !important; left: 0px; line-height: inherit !important; margin: -8px 0px 0px; padding: 0px; position: absolute; top: 9px; width: 24px;">
</div>
</div>
<div class="crayon-button crayon-popup-button" style="background-attachment: initial; background-clip: initial; background-color: transparent !important; background-image: initial; background-origin: initial; background-position: 0px center; background-repeat: no-repeat; background-size: initial; border: 0px; box-sizing: inherit; display: inline; float: left !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: 15px; margin: 0px; padding: 0px; position: relative; width: 24px;" title="Open Code In New Window">
<div class="crayon-button-icon" style="background: url("https://www.percona.com/community-blog/wp-content/plugins/crayon-syntax-highlighter/css/images/toolbar/buttons@2x.png") 0px 0px / 48px 128px; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: 16px !important; left: 0px; line-height: inherit !important; margin: -8px 0px 0px; padding: 0px; position: absolute; top: 9px; width: 24px;">
</div>
</div>
<span class="crayon-language" style="box-sizing: inherit; color: rgb(153, 153, 153) !important; float: left; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; padding: 0px 8px 0px 4px !important;">Shell</span></div>
</div>
<div class="crayon-plain-wrap" style="background: 0px center; border: 0px; box-sizing: inherit; height: auto !important; margin: 0px !important; padding: 0px !important;">
<textarea class="crayon-plain print-no" data-settings="click" readonly="" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-color: initial; border-radius: 0px; border-style: initial; border-width: 0px; box-shadow: none; color: black; font-family: Monaco, MonacoRegular, "Courier New", monospace !important; font-size: 12px !important; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; height: 243px; line-height: 15px !important; margin: 0px; max-width: 100%; opacity: 0; overflow-wrap: normal; overflow: hidden; padding-left: 5px; padding-right: 5px; padding-top: 0px; position: absolute; resize: none; tab-size: 4; white-space: pre; width: 660px; z-index: 0;" wrap="soft"></textarea></div>
<div class="crayon-main" style="background: 0px center; border: 0px; box-sizing: inherit; margin: 0px; overflow: hidden; padding: 0px; position: relative; width: 660px; z-index: 1;">
<table class="crayon-table" style="background: none !important; border-collapse: collapse !important; border-spacing: 0px !important; border: none !important; box-sizing: inherit; font-size: 12px; margin-bottom: 0px !important; margin-left: 0px; margin-right: 0px !important; margin-top: 0px !important; padding: 0px !important; table-layout: auto !important; width: auto !important;"><tbody style="box-sizing: inherit;">
<tr class="crayon-row" style="background: 0px center; border: none !important; box-sizing: inherit; margin: 0px !important; padding: 0px !important; vertical-align: top !important;"><td class="crayon-nums " data-settings="show" style="background: 0px center; border-bottom: 0px; border-image: initial; border-left: 0px; border-right: 3px solid rgb(108, 226, 108) !important; border-top: 0px; box-sizing: inherit; color: rgb(175, 175, 175) !important; margin: 0px !important; padding: 0px 5px 0px 0px !important; vertical-align: top !important;"><div class="crayon-nums-content" style="background: 0px center; border: 0px; box-sizing: inherit; line-height: 15px !important; margin: 0px; padding: 0px; white-space: nowrap;">
<div class="crayon-num" data-line="crayon-5bd32b738015f292952802-1" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
1</div>
<div class="crayon-num crayon-striped-num" data-line="crayon-5bd32b738015f292952802-2" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
2</div>
<div class="crayon-num" data-line="crayon-5bd32b738015f292952802-3" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
3</div>
<div class="crayon-num crayon-striped-num" data-line="crayon-5bd32b738015f292952802-4" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
4</div>
<div class="crayon-num" data-line="crayon-5bd32b738015f292952802-5" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
5</div>
<div class="crayon-num crayon-striped-num" data-line="crayon-5bd32b738015f292952802-6" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
6</div>
<div class="crayon-num" data-line="crayon-5bd32b738015f292952802-7" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
7</div>
<div class="crayon-num crayon-striped-num" data-line="crayon-5bd32b738015f292952802-8" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
8</div>
<div class="crayon-num" data-line="crayon-5bd32b738015f292952802-9" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
9</div>
<div class="crayon-num crayon-striped-num" data-line="crayon-5bd32b738015f292952802-10" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
10</div>
<div class="crayon-num" data-line="crayon-5bd32b738015f292952802-11" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
11</div>
<div class="crayon-num crayon-striped-num" data-line="crayon-5bd32b738015f292952802-12" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
12</div>
<div class="crayon-num" data-line="crayon-5bd32b738015f292952802-13" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
13</div>
<div class="crayon-num crayon-striped-num" data-line="crayon-5bd32b738015f292952802-14" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
14</div>
<div class="crayon-num" data-line="crayon-5bd32b738015f292952802-15" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding: 0px 5px; text-align: center;">
15</div>
</div>
</td><td class="crayon-code" style="background: 0px center; border: 0px; box-sizing: inherit; margin: 0px !important; padding: 0px !important; vertical-align: top !important; width: 629px;"><div class="crayon-pre" style="background: none !important; border: none !important; box-sizing: inherit; line-height: 15px !important; margin: 0px; overflow: visible; padding: 0px; tab-size: 4; white-space: pre;">
<div class="crayon-line" id="crayon-5bd32b738015f292952802-1" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding-bottom: 0px; padding-left: 10px !important; padding-right: 5px; padding-top: 0px;">
<span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">></span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-v" style="box-sizing: inherit; color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">db</span><span class="crayon-e" style="box-sizing: inherit; color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">.employees</span><span class="crayon-e" style="box-sizing: inherit; color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">.find</span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">(</span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">{</span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">}</span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">)</span><span class="crayon-e" style="box-sizing: inherit; color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">.pretty</span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">(</span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">)</span></div>
<div class="crayon-line crayon-striped-line" id="crayon-5bd32b738015f292952802-2" style="background: rgb(249, 249, 249) !important; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding-bottom: 0px; padding-left: 10px !important; padding-right: 5px; padding-top: 0px;">
<span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">{</span></div>
<div class="crayon-line" id="crayon-5bd32b738015f292952802-3" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding-bottom: 0px; padding-left: 10px !important; padding-right: 5px; padding-top: 0px;">
<span class="crayon-s" style="box-sizing: inherit; color: rgb(0, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">"_id"</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">:</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-e" style="box-sizing: inherit; color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">ObjectId</span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">(</span><span class="crayon-s" style="box-sizing: inherit; color: rgb(0, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">"5bb740cfd73e26bf45435181"</span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">)</span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">,</span></div>
<div class="crayon-line crayon-striped-line" id="crayon-5bd32b738015f292952802-4" style="background: rgb(249, 249, 249) !important; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding-bottom: 0px; padding-left: 10px !important; padding-right: 5px; padding-top: 0px;">
<span class="crayon-s" style="box-sizing: inherit; color: rgb(0, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">"Salary"</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">:</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">60117</span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">,</span></div>
<div class="crayon-line" id="crayon-5bd32b738015f292952802-5" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding-bottom: 0px; padding-left: 10px !important; padding-right: 5px; padding-top: 0px;">
<span class="crayon-s" style="box-sizing: inherit; color: rgb(0, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">"emp_no"</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">:</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-cn" style="box-sizing: inherit; color: rgb(206, 0, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">10001</span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">,</span></div>
<div class="crayon-line crayon-striped-line" id="crayon-5bd32b738015f292952802-6" style="background: rgb(249, 249, 249) !important; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding-bottom: 0px; padding-left: 10px !important; padding-right: 5px; padding-top: 0px;">
<span class="crayon-s" style="box-sizing: inherit; color: rgb(0, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">"hire_date"</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">:</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-e" style="box-sizing: inherit; color: rgb(0, 78, 208) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">ISODate</span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">(</span><span class="crayon-s" style="box-sizing: inherit; color: rgb(0, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">"1986-06-26T00:00:00Z"</span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">)</span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">,</span></div>
<div class="crayon-line" id="crayon-5bd32b738015f292952802-7" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding-bottom: 0px; padding-left: 10px !important; padding-right: 5px; padding-top: 0px;">
<span class="crayon-s" style="box-sizing: inherit; color: rgb(0, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">"last_name"</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">:</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-s" style="box-sizing: inherit; color: rgb(0, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">"Facello"</span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">,</span></div>
<div class="crayon-line crayon-striped-line" id="crayon-5bd32b738015f292952802-8" style="background: rgb(249, 249, 249) !important; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding-bottom: 0px; padding-left: 10px !important; padding-right: 5px; padding-top: 0px;">
<span class="crayon-s" style="box-sizing: inherit; color: rgb(0, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">"Department"</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">:</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">[</span></div>
<div class="crayon-line" id="crayon-5bd32b738015f292952802-9" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding-bottom: 0px; padding-left: 10px !important; padding-right: 5px; padding-top: 0px;">
<span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">{</span></div>
<div class="crayon-line crayon-striped-line" id="crayon-5bd32b738015f292952802-10" style="background: rgb(249, 249, 249) !important; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding-bottom: 0px; padding-left: 10px !important; padding-right: 5px; padding-top: 0px;">
<span class="crayon-s" style="box-sizing: inherit; color: rgb(0, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">"dept_id"</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">:</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-s" style="box-sizing: inherit; color: rgb(0, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">"d005"</span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">,</span></div>
<div class="crayon-line" id="crayon-5bd32b738015f292952802-11" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding-bottom: 0px; padding-left: 10px !important; padding-right: 5px; padding-top: 0px;">
<span class="crayon-s" style="box-sizing: inherit; color: rgb(0, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">"dept_name"</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">:</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-s" style="box-sizing: inherit; color: rgb(0, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">"Development"</span></div>
<div class="crayon-line crayon-striped-line" id="crayon-5bd32b738015f292952802-12" style="background: rgb(249, 249, 249) !important; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding-bottom: 0px; padding-left: 10px !important; padding-right: 5px; padding-top: 0px;">
<span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">}</span></div>
<div class="crayon-line" id="crayon-5bd32b738015f292952802-13" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding-bottom: 0px; padding-left: 10px !important; padding-right: 5px; padding-top: 0px;">
<span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">]</span><span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">,</span></div>
<div class="crayon-line crayon-striped-line" id="crayon-5bd32b738015f292952802-14" style="background: rgb(249, 249, 249) !important; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding-bottom: 0px; padding-left: 10px !important; padding-right: 5px; padding-top: 0px;">
<span class="crayon-s" style="box-sizing: inherit; color: rgb(0, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">"first_name"</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-o" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">:</span><span class="crayon-h" style="box-sizing: inherit; color: rgb(0, 111, 224) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;"> </span><span class="crayon-s" style="box-sizing: inherit; color: rgb(0, 128, 0) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">"Georgi"</span></div>
<div class="crayon-line" id="crayon-5bd32b738015f292952802-15" style="background: 0px center; border: 0px; box-sizing: inherit; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important; margin: 0px; padding-bottom: 0px; padding-left: 10px !important; padding-right: 5px; padding-top: 0px;">
<span class="crayon-sy" style="box-sizing: inherit; color: rgb(51, 51, 51) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">}</span></div>
</div>
</td></tr>
</tbody></table>
</div>
</div>
<div style="background-color: white; box-sizing: inherit; color: #373a3c; font-family: "Helvetica Neue", Helvetica, Arial, Open-sans, sans-serif; font-size: 13px; line-height: 21px; margin-bottom: 1rem; margin-top: 10px !important;">
We have successfully migrated some data from MySQL to MongoDB!</div>
<div style="background-color: white; box-sizing: inherit; color: #373a3c; font-family: "Helvetica Neue", Helvetica, Arial, Open-sans, sans-serif; font-size: 13px; line-height: 21px; margin-bottom: 1rem; margin-top: 10px !important;">
<em style="box-sizing: inherit;">The content in this blog is provided in good faith by members of the open source community. The content is not edited or tested by Percona, and views expressed are the authors’ own. When using the advice from this or any other online resource <span style="box-sizing: inherit; font-weight: 700;">test</span> ideas before applying them to your production systems, and <span style="box-sizing: inherit; font-weight: 700;">always </span>secure a working back up.</em></div>
<div class="blogger-post-footer"><script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-8190616-1");
pageTracker._trackPageview();
} catch(err) {}</script></div>Aftab Khanhttp://www.blogger.com/profile/17201066985732943851noreply@blogger.com4tag:blogger.com,1999:blog-8545214922787541097.post-65814887988181142642018-10-10T02:22:00.001-07:002018-10-10T02:22:36.613-07:00Minimize MySQL Deadlocks with 3 Steps<div style="background-color: white; box-sizing: inherit; color: #373a3c; font-family: "Helvetica Neue", Helvetica, Arial, Open-sans, sans-serif; font-size: 13px; line-height: 21px; margin-bottom: 1rem; margin-top: 10px !important;">
MySQL has locking capabilities, for example table and row level locking, and such locks are needed to control data integrity in multi-user concurrency. Deadlocks—where two or more transactions are waiting for one another to give up locks before the transactions can proceed successfully—are an unwanted situation. It is a classic problem for all databases including MySQL/PostgreSQL/Oracle etc. By default, MySQL detects the deadlock condition and to break the deadlock it rolls back one of the transactions.</div>
<div style="background-color: white; box-sizing: inherit; color: #373a3c; font-family: "Helvetica Neue", Helvetica, Arial, Open-sans, sans-serif; font-size: 13px; line-height: 21px; margin-bottom: 1rem; margin-top: 10px !important;">
For a deadlock example, see <a href="https://dev.mysql.com/doc/refman/8.0/en/innodb-deadlock-example.html" rel="nofollow noopener" style="background-color: transparent; box-sizing: inherit; color: #bf3119; font-family: "Open Sans", sans-serif; text-decoration-line: none; transition: all 0.25s ease-in-out 0s;" target="_blank">InnoDB deadlocks</a></div>
<h2 style="background-color: white; box-sizing: inherit; color: #373a3c; font-family: "Helvetica Neue", Helvetica, Arial, Open-sans, sans-serif; font-size: 24px !important; line-height: 36px; margin-bottom: 0.5rem; margin-top: 0px;">
Some misconceptions</h2>
<div style="background-color: white; box-sizing: inherit; color: #373a3c; font-family: "Helvetica Neue", Helvetica, Arial, Open-sans, sans-serif; font-size: 13px; line-height: 21px; margin-bottom: 1rem; margin-top: 10px !important;">
There are some misconceptions about deadlocks:</div>
<div style="background-color: white; box-sizing: inherit; color: #373a3c; font-family: "Helvetica Neue", Helvetica, Arial, Open-sans, sans-serif; font-size: 13px; line-height: 21px; margin-bottom: 1rem; margin-top: 10px !important;">
a) <span style="box-sizing: inherit; font-weight: 700;">Transaction isolation levels are responsible for deadlocks</span>. The possibility of deadlocks is not affected by isolation level. Isolation level changes the behavior of read operations, but deadlock occurs due to write operations. However, isolation level sets fewer locks, hence it can help you to avoid certain lock types (e.g. gap locking).</div>
<div style="background-color: white; box-sizing: inherit; color: #373a3c; font-family: "Helvetica Neue", Helvetica, Arial, Open-sans, sans-serif; font-size: 13px; line-height: 21px; margin-bottom: 1rem; margin-top: 10px !important;">
b) <span style="box-sizing: inherit; font-weight: 700;">Small transactions are not affected by deadlocks.</span> Small transactions are less prone to deadlocks but it can still happen if transactions do not use the same order of operations.</div>
<div style="background-color: white; box-sizing: inherit; color: #373a3c; font-family: "Helvetica Neue", Helvetica, Arial, Open-sans, sans-serif; font-size: 13px; line-height: 21px; margin-bottom: 1rem; margin-top: 10px !important;">
c) <span style="box-sizing: inherit; font-weight: 700;">Deadlocks are dangerous.</span> I still hear from some customers who are using MyISAM tables that their reason for not switching to InnoDB is the deadlock problem. Deadlocks aren’t dangerous if you retry the transaction that failed due to deadlock and follow the steps given below in this article.</div>
<div style="background-color: white; box-sizing: inherit; color: #373a3c; font-family: "Helvetica Neue", Helvetica, Arial, Open-sans, sans-serif; font-size: 13px; line-height: 21px; margin-bottom: 1rem; margin-top: 10px !important;">
I hope that this article will help clear such misconceptions.</div>
<div style="background-color: white; box-sizing: inherit; color: #373a3c; font-family: "Helvetica Neue", Helvetica, Arial, Open-sans, sans-serif; font-size: 13px; line-height: 21px; margin-bottom: 1rem; margin-top: 10px !important;">
Back to the topic of this article. There are many possibilities that can cause deadlocks to occur and, for simplicity, I have grouped my recommendations into 3 steps.</div>
<h2 style="background-color: white; box-sizing: inherit; color: #373a3c; font-family: "Helvetica Neue", Helvetica, Arial, Open-sans, sans-serif; font-size: 24px !important; line-height: 36px; margin-bottom: 0.5rem; margin-top: 0px;">
1) Use a lock-avoiding design strategy</h2>
<ul style="background-color: white; box-sizing: inherit; color: #373a3c; font-family: "Helvetica Neue", Helvetica, Arial, Open-sans, sans-serif; font-size: 13px; margin-bottom: 1rem; margin-top: 0px;">
<li style="box-sizing: inherit;">Break big transactions into smaller transactions: keeping transactions short make them less prone to collision.</li>
<li style="box-sizing: inherit;">If you use INSERT INTO … SELECT to copy some or all rows from one table to another, consider using a lesser locking transaction isolation level (e.g. READ_COMMITTED) and set the binary log format to row/mixed for that transaction. Alternatively, design your application to put a single INSERT statement in a loop and copy row(s) into the table.</li>
<li style="box-sizing: inherit;">If your application performs locking reads, for example SELECT … FOR UPDATE or SELECT .. FOR SHARE consider using the NOWAIT and SKIPPED LOCK options available in MySQL 8.0, see <a href="https://dev.mysql.com/doc/refman/8.0/en/innodb-locking-reads.html#innodb-locking-reads-nowait-skip-locked" rel="nofollow noopener" style="background-color: transparent; box-sizing: inherit; color: #bf3119; font-family: "Open Sans", sans-serif; text-decoration-line: none; transition: all 0.25s ease-in-out 0s;" target="_blank">Locking Read Concurrency with NOWAIT and SKIP LOCKED</a>. Alternatively, you may consider using a lesser locking transaction isolation level (described earlier)</li>
<li style="box-sizing: inherit;">Multiple transactions updating data set in one or more tables, should use the same order of operation for their transactions. Avoid locking table A, B, C in one transaction and C,A,B in another.</li>
<li style="box-sizing: inherit;">If you have the application retry when a transaction fails due to deadlock, you should ideally have the application take a brief pause before resubmitting its query/transaction. This gives the other transaction involved in the deadlock a chance to complete and release the locks that formed part of the deadlock cycle.</li>
</ul>
<h2 style="background-color: white; box-sizing: inherit; color: #373a3c; font-family: "Helvetica Neue", Helvetica, Arial, Open-sans, sans-serif; font-size: 24px !important; line-height: 36px; margin-bottom: 0.5rem; margin-top: 0px;">
2) Optimize queries</h2>
<ul style="background-color: white; box-sizing: inherit; color: #373a3c; font-family: "Helvetica Neue", Helvetica, Arial, Open-sans, sans-serif; font-size: 13px; margin-bottom: 1rem; margin-top: 0px;">
<li style="box-sizing: inherit;">Well optimized queries examine fewer rows and as result set fewer locks.</li>
</ul>
<h2 style="background-color: white; box-sizing: inherit; color: #373a3c; font-family: "Helvetica Neue", Helvetica, Arial, Open-sans, sans-serif; font-size: 24px !important; line-height: 36px; margin-bottom: 0.5rem; margin-top: 0px;">
3) Disable deadlock detection (for systems running MySQL 8+)</h2>
<ul style="background-color: white; box-sizing: inherit; color: #373a3c; font-family: "Helvetica Neue", Helvetica, Arial, Open-sans, sans-serif; font-size: 13px; margin-bottom: 1rem; margin-top: 0px;">
<li style="box-sizing: inherit;">If you’re running a high concurrency system, it maybe more efficient to disable deadlock detection and rely on the <a href="https://dev.mysql.com/doc/refman/5.5/en/innodb-parameters.html#sysvar_innodb_lock_wait_timeout" style="background-color: transparent; box-sizing: inherit; color: #bf3119; font-family: "Open Sans", sans-serif; text-decoration-line: none; transition: all 0.25s ease-in-out 0s;" target="_blank"><span class="crayon-syntax crayon-syntax-inline crayon-theme-familiar crayon-theme-familiar-inline crayon-font-monaco" id="crayon-5bbdc4ac6e86a779229786" style="background: rgb(250, 250, 250) !important; border-color: rgb(221, 221, 221) !important; border-style: solid !important; border-width: 1px !important; box-sizing: border-box; direction: ltr !important; font-family: Monaco, MonacoRegular, "Courier New", monospace; font-size: 12px !important; line-height: 15px !important; margin: 0px 2px; overflow: hidden !important; padding: 0px 2px; position: relative !important; text-shadow: none !important; text-size-adjust: none; width: 100%;"><span class="crayon-pre crayon-code" style="background: none !important; border: none !important; box-sizing: inherit; color: black; line-height: 15px !important; margin: 0px; overflow: visible; padding: 0px; tab-size: 4; width: 100%;"><span class="crayon-v" style="box-sizing: inherit; color: rgb(0, 45, 122) !important; font-family: inherit; font-size: inherit !important; font-weight: inherit !important; height: inherit; line-height: inherit !important;">innodb_lock_wait_timeout</span></span></span></a> setting. However, keep this setting low. The default timeout setting is 50 seconds which is too long if you’re running without deadlock detection. Be careful when disabling deadlock detection as it may do more harm than good.</li>
</ul>
<div class="blogger-post-footer"><script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-8190616-1");
pageTracker._trackPageview();
} catch(err) {}</script></div>Aftab Khanhttp://www.blogger.com/profile/17201066985732943851noreply@blogger.com0tag:blogger.com,1999:blog-8545214922787541097.post-1429693167507025522016-05-19T07:35:00.000-07:002016-05-19T07:50:40.040-07:00Want to delete hierarchical data in MySQLIn MySQL hierarchical data is stored in the form of parent and child tables and often foreign key(s) are used to perform referential action e.g. to help keep data consistent, so it won't allow delete/update operation on a parent row being referenced in a child table. One way to address this issue is to use DELETE/UPDATE CASCADE option - Delete or update the row from the parent table, and automatically delete or update the matching rows in the child table. However, such operation is typically not considered when implementing foreign keys, it also has performance implications, referential checks are performed row by row and if a parent record has millions of related records in child table(s) then this operation would take considerably long to complete, furthermore, quoting from MySQL docs "cascading operation may not be nested more than 15 levels deep," , for more information visit <a href="http://dev.mysql.com/doc/refman/5.7/en/innodb-foreign-key-constraints.html">http://dev.mysql.com/doc/refman/5.7/en/innodb-foreign-key-constraints.html</a><br />
<br />
Another way to delete hierarchical data is to first identify all child tables (at all N levels deep), this could be difficult if you are dealing with a big schema (with 100s of tables) and then start delete operation in reverse order i.e. delete data from child table first.<br />
<br />
Note: you can obtain information about foreign keys by querying the INFORMATION_SCHEMA.KEY_COLUMN_USAGE table.<br />
http://dev.mysql.com/doc/refman/5.7/en/key-column-usage-table.html<br />
<br />
To simplify such operation I have developed a program that can help delete hierarchical data:<br />
<a href="https://github.com/aftabakhan/dbtools">https://github.com/aftabakhan/dbtools</a><br />
<br />
<br />
<br />
<br />
<br />
<br /><div class="blogger-post-footer"><script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-8190616-1");
pageTracker._trackPageview();
} catch(err) {}</script></div>Aftab Khanhttp://www.blogger.com/profile/17201066985732943851noreply@blogger.com0tag:blogger.com,1999:blog-8545214922787541097.post-3670139654023268672015-05-22T06:37:00.001-07:002015-05-22T06:37:05.134-07:00MySQL cannot use indexes - common mistake<div style="background-color: white; color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 22.2222232818604px; padding: 0px;">
I recently helped one customer to help resolve performance issue. The problem was caused by a very simple update query that modifies only one record:</div>
<div style="background-color: white; color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 22.2222232818604px; margin-top: 10px; padding: 0px;">
<br /></div>
<div class="preformatted panel" style="background-color: white; border-radius: 3px; border: 1px solid rgb(204, 204, 204); color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 22.2222232818604px; margin: 10px 0px; overflow: auto; padding: 0px;">
<div class="preformattedContent panelContent" style="margin: 0px; padding: 10px;">
<pre style="font-family: 'Courier New', Courier, monospace; line-height: 1.3; padding: 0px;">EXPLAIN UPDATE PROD_CHECK_MODULES SET DATE_CHECK = NOW() WHERE COUGAR_NAME='cougar-p01' AND ID_MODULE=4 AND NUM_MODULE=03;
+------+-------------+--------------------+-------+---------------+-----------+---------+------+------+-------------+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
+------+-------------+--------------------+-------+---------------+-----------+---------+------+------+-------------+
| 1 | SIMPLE | PROD_CHECK_MODULES | range | ID_MODULE | ID_MODULE | 4 | NULL | 6 | Using where |
+------+-------------+--------------------+-------+---------------+-----------+---------+------+------+-------------+
1 row in set (0.00 sec)
SHOW CREATE TABLE PROD_CHECK_MODULES\G
*************************** 1. row ***************************
....
`COUGAR_NAME` varchar(64) NOT NULL,
`ID_MODULE` int(11) NOT NULL,
`NUM_MODULE` char(3) NOT NULL
...
UNIQUE KEY `COUGAR_NAME` (`COUGAR_NAME`,`ID_MODULE`,`NUM_MODULE`),</pre>
<pre style="font-family: 'Courier New', Courier, monospace; line-height: 1.3; padding: 0px;">KEY `ID_MODULE` (`ID_MODULE`)
.....</pre>
</div>
</div>
<div style="background-color: white; color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 22.2222232818604px; margin-top: 10px; padding: 0px;">
Ideally it should be using "unique key" to examine/update 1 row. Table in question has got < 200 rows. However, it still does not look too bad "<b>6</b><strong> rows vs 1 rows</strong>" but it blocked large number of similar update queries due to long running transaction. The first thing done was to identify and kill long running transaction that was blocking other 'update' queries. and then tune 'update' query. </div>
<div style="background-color: white; color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 22.2222232818604px; margin-top: 10px; padding: 0px;">
The issue here is that value 03 cannot be compared to column <i>NUM_MODULE</i> without data type conversion i.e. we are comparing numeric value with string column, that is why MySQL could not use available and most suitable index . We had two solutions to fix this:</div>
<div style="background-color: white; color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 22.2222232818604px; margin-top: 10px; padding: 0px;">
<br /></div>
<div style="background-color: white; color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 22.2222232818604px; margin-top: 10px; padding: 0px;">
a) Modify query to use quotes with a value e.g. </div>
<pre style="background-color: white; color: #333333; font-size: 14px; line-height: 22.2222232818604px; margin-top: 10px; padding: 0px;">NUM_MODULE="03"</pre>
<div style="background-color: white; color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 22.2222232818604px; margin-top: 10px; padding: 0px;">
b) Modify table structure to use type integer </div>
<pre style="background-color: white; color: #333333; font-size: 14px; line-height: 22.2222232818604px; margin-top: 10px; padding: 0px;">NUM_MODULE SMALLINT NOT NULL</pre>
<div style="background-color: white; color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 22.2222232818604px; margin-top: 10px; padding: 0px;">
The easy fix was to modify table structure, because all <i>NUM_MODULE </i>values are numeric and table is quite small.</div>
<div style="background-color: white; color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 22.2222232818604px; margin-top: 10px; padding: 0px;">
<br /></div>
<div class="blogger-post-footer"><script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-8190616-1");
pageTracker._trackPageview();
} catch(err) {}</script></div>Aftab Khanhttp://www.blogger.com/profile/17201066985732943851noreply@blogger.com0tag:blogger.com,1999:blog-8545214922787541097.post-46453612422621894902015-05-11T04:19:00.000-07:002015-05-11T06:14:13.849-07:00Tracking long running processes in MySQL<div style="background-color: white; color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 22.2222232818604px; padding: 0px;">
Tracking long running processes in MySQL is not difficult. A process can be:</div>
<ul style="background-color: white; color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 22.2222232818604px; margin: 10px 0px 0px;">
<li>SQL query</li>
<li>Transaction </li>
</ul>
<div style="background-color: white; color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 22.2222232818604px; margin-top: 10px; padding: 0px;">
There are different ways of tracking both type of processes.. First we would look at some of the available methods to identify long running queries:</div>
<ul style="background-color: white; color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 22.2222232818604px; margin: 10px 0px 0px;">
<li>slow query log</li>
<li>[pt-kill]</li>
<li>performance schema</li>
<li>packet inspection</li>
</ul>
<div style="background-color: white; color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 22.2222232818604px; margin-top: 10px; padding: 0px;">
<strong style="line-height: 1.4285715;"><br /></strong>
<strong style="line-height: 1.4285715;">Slow query log</strong><span style="line-height: 1.4285715;"> - This is the common method of identifying slow queries. You would need to check if its already enabled:</span></div>
<div style="background-color: white; color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 22.2222232818604px; margin-top: 10px; padding: 0px;">
<br /></div>
<div class="preformatted panel" style="background-color: white; border-radius: 3px; border: 1px solid rgb(204, 204, 204); color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 22.2222232818604px; margin: 10px 0px; overflow: auto; padding: 0px;">
<div class="preformattedContent panelContent" style="margin: 0px; padding: 10px;">
<pre style="font-family: 'Courier New', Courier, monospace; line-height: 1.3; padding: 0px;">mysql> SHOW GLOBAL VARIABLES WHERE VARIABLE_NAME LIKE 'slow_query%' OR VARIABLE_NAME LIKE 'long_query_time';
+---------------------+----------------------------------+
| Variable_name | Value |
+---------------------+----------------------------------+
| long_query_time | 10.000000 |
| slow_query_log | OFF |
| slow_query_log_file | /data/mysql/log/mariadb-slow.log |
+---------------------+----------------------------------+
3 rows in set (0.01 sec)
</pre>
</div>
</div>
<div style="background-color: white; color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 22.2222232818604px; margin-top: 10px; padding: 0px;">
In this example, it is not. To enable slow query log, issue following commands: </div>
<div class="preformatted panel" style="background-color: white; border-radius: 3px; border: 1px solid rgb(204, 204, 204); color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 22.2222232818604px; margin: 10px 0px; overflow: auto; padding: 0px;">
<div class="preformattedContent panelContent" style="margin: 0px; padding: 10px;">
<pre style="font-family: 'Courier New', Courier, monospace; line-height: 1.3; padding: 0px;">mysql> SET GLOBAL slow_query_log=ON;
Query OK, 0 rows affected (0.00 sec)
mysql> set global long_query_time=1.0;
Query OK, 0 rows affected (0.00 sec)</pre>
</div>
</div>
<div style="background-color: white; color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 22.2222232818604px; margin-top: 10px; padding: 0px;">
I took the opportunity to reduce long_query_time value from 10 seconds to just 1 second as well. The idea is to capture all queries that take at least 1 second. To make those changes persistent you would have to modify MySQL configuration file (e.g. /etc/my.cnf or my.ini) </div>
<div class="preformatted panel" style="background-color: white; border-radius: 3px; border: 1px solid rgb(204, 204, 204); color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 22.2222232818604px; margin: 10px 0px; overflow: auto; padding: 0px;">
<div class="preformattedContent panelContent" style="margin: 0px; padding: 10px;">
<pre style="font-family: 'Courier New', Courier, monospace; line-height: 1.3; padding: 0px;">[mysqld]
..
slow_query_log = ON
long_query_time = 1</pre>
</div>
</div>
<div style="background-color: white; color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 22.2222232818604px; margin-top: 10px; padding: 0px;">
Next you would like to summarize slow query log, you have two famous methods to choose from:</div>
<div style="background-color: white; color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 22.2222232818604px; margin-top: 10px; padding: 0px;">
<strong>mysqldumpslow</strong> - classic method that have been used since mysql is born, on-line docs explain it very well, click <a class="external-link" href="https://dev.mysql.com/doc/refman/5.6/en/mysqldumpslow.html" rel="nofollow" style="color: #3b73af; text-decoration: none;">here</a></div>
<div style="background-color: white; color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 22.2222232818604px; margin-top: 10px; padding: 0px;">
<strong>pt-query-digest</strong> - This method has been widely adopted by the community, click <a class="external-link" href="http://www.percona.com/doc/percona-toolkit/2.2/pt-query-digest.html" rel="nofollow" style="color: #3b73af; text-decoration: none;">here</a> to learn more about it. </div>
<div style="background-color: white; color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 22.2222232818604px; margin-top: 10px; padding: 0px;">
<br /></div>
<div style="background-color: white; color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 22.2222232818604px; margin-top: 10px; padding: 0px;">
If you are still using older release of MySQL e.g. 5.0 or earlier. It is not possible to enable slow query logging without rebooting MySQLd process. If you cannot restart MySQL process, you can still track slow queries using <a class="external-link" href="http://www.percona.com/doc/percona-toolkit/2.1/pt-kill.html" rel="nofollow" style="color: #3b73af; text-decoration: none;">pt-kill</a> utility:</div>
<div class="preformatted panel" style="background-color: white; border-radius: 3px; border: 1px solid rgb(204, 204, 204); color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 22.2222232818604px; margin: 10px 0px; overflow: auto; padding: 0px;">
<div class="preformattedContent panelContent" style="margin: 0px; padding: 10px;">
<pre style="font-family: 'Courier New', Courier, monospace; line-height: 1.3; padding: 0px;">$ pt-kill --host=localhost -udba --ask-pass --busy-time 1 --print --daemonize --log /var/log/slow-query.log # --busy-time decides queries that have been running for longer than this time</pre>
</div>
</div>
<div style="background-color: white; color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 22.2222232818604px; margin-top: 10px; padding: 0px;">
<span style="color: red;">Remember NOT to specify --kill option, as it would start killing your queries</span></div>
<div style="background-color: white; color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 22.2222232818604px; margin-top: 10px; padding: 0px;">
<br /></div>
<div style="background-color: white; color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 22.2222232818604px; margin-top: 10px; padding: 0px;">
<strong>Performance schema</strong> - It was introduced in version 5.5, by default it is enabled in 5.6+ release. It provides a way to inspect internal server events (such as IO activity, locks, query profiling etc). It can also be used to track timing on long running processes. Below are few examples of the commands that can be used to track long running queries, queries that use temporary table and/or the ones that perform full-table scan:</div>
<div class="preformatted panel" style="background-color: white; border-radius: 3px; border: 1px solid rgb(204, 204, 204); color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 22.2222232818604px; margin: 10px 0px; overflow: auto; padding: 0px;">
<div class="preformattedContent panelContent" style="margin: 0px; padding: 10px;">
<pre style="font-family: 'Courier New', Courier, monospace; line-height: 1.3; padding: 0px;">###
## A high level overview of the statements like Query Analysis, sorted by those queries with the highest latency
##
SELECT DIGEST, DIGEST_TEXT AS query,
first_seen,
last_seen,
COUNT_STAR AS exec_count,
SUM_NO_INDEX_USED AS no_index_used_count,
SUM_NO_GOOD_INDEX_USED AS no_good_index_used_count,
ROUND((SUM_NO_INDEX_USED / COUNT_STAR) * 100) no_index_used_pct
FROM performance_schema.events_statements_summary_by_digest
WHERE SUM_NO_INDEX_USED > 0
OR SUM_NO_GOOD_INDEX_USED > 0
ORDER BY no_index_used_pct DESC, exec_count DESC LIMIT 5\G
###
# List all normalized statements that use temporary tables ordered by number of on disk temporary tables descending first, then by the number of memory tables.
###
SELECT IF(LENGTH(DIGEST_TEXT) > 64, CONCAT(LEFT(DIGEST_TEXT, 30), ' ... ', RIGHT(DIGEST_TEXT, 30)), DIGEST_TEXT) AS query,
COUNT_STAR AS exec_count,
SUM_CREATED_TMP_TABLES AS memory_tmp_tables,
SUM_CREATED_TMP_DISK_TABLES AS disk_tmp_tables,
ROUND(SUM_CREATED_TMP_TABLES / COUNT_STAR) AS avg_tmp_tables_per_query,
ROUND((SUM_CREATED_TMP_DISK_TABLES / SUM_CREATED_TMP_TABLES) * 100) AS tmp_tables_to_disk_pct,
DIGEST AS digest
FROM performance_schema.events_statements_summary_by_digest
WHERE SUM_CREATED_TMP_TABLES > 0
ORDER BY SUM_CREATED_TMP_DISK_TABLES DESC, SUM_CREATED_TMP_TABLES DESC LIMIT 5;
###
# List all normalized statements that use have done a full table scan ordered by the percentage of times a full scan was done, then by the number of times the statement executed
###
SELECT IF(LENGTH(DIGEST_TEXT) > 64, CONCAT(LEFT(DIGEST_TEXT, 30), ' ... ', RIGHT(DIGEST_TEXT, 30)), DIGEST_TEXT) AS query,
COUNT_STAR AS exec_count,
SUM_NO_INDEX_USED AS no_index_used_count,
SUM_NO_GOOD_INDEX_USED AS no_good_index_used_count,
ROUND((SUM_NO_INDEX_USED / COUNT_STAR) * 100) no_index_used_pct,
DIGEST AS digest
FROM performance_schema.events_statements_summary_by_digest
WHERE SUM_NO_INDEX_USED > 0
OR SUM_NO_GOOD_INDEX_USED > 0
ORDER BY no_index_used_pct DESC, exec_count DESC LIMIT 5;</pre>
</div>
</div>
<div style="background-color: white; color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 22.2222232818604px; margin-top: 10px; padding: 0px;">
<strong>Packet inspection</strong> - this can be achieved using tcpdump utility, not covered in this article. This is due to its known limitations:</div>
<ul style="background-color: white; color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 22.2222232818604px; margin: 10px 0px 0px;">
<li>you can only observe queries sent over the network.</li>
<li>you don’t see queries sent through Unix sockets or via replication. </li>
<li>you also can’t see queries run from stored procedures.</li>
<li>security concern, this method requires root access.</li>
</ul>
<div style="background-color: white; color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 22.2222232818604px; margin-top: 10px; padding: 0px;">
if you are keen to explore this method of tracking slow queries click <a class="external-link" href="https://www.percona.com/blog/2011/04/18/how-to-use-tcpdump-on-very-busy-hosts/" rel="nofollow" style="color: #3b73af; text-decoration: none;">here</a> and <a class="external-link" href="https://www.percona.com/blog/2009/07/01/gathering-queries-from-a-server-with-maatkit-and-tcpdump/" rel="nofollow" style="color: #3b73af; text-decoration: none;">here</a> </div>
<div style="background-color: white; color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 22.2222232818604px; margin-top: 10px; padding: 0px;">
<br /></div>
<div style="background-color: white; color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 22.2222232818604px; margin-top: 10px; padding: 0px;">
In the next article, I would blog about how to identify long running transactions...</div>
<div class="blogger-post-footer"><script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-8190616-1");
pageTracker._trackPageview();
} catch(err) {}</script></div>Aftab Khanhttp://www.blogger.com/profile/17201066985732943851noreply@blogger.com1tag:blogger.com,1999:blog-8545214922787541097.post-37177426428986812332015-02-02T09:59:00.001-08:002015-02-04T05:03:10.204-08:00MySQL-5.7.5-m15 - out of the box security improvements I<span style="font-family: Times, Times New Roman, serif;">n this article I would understand out of the box security improvement available in MySQL 5.7.5 release (not production ready yet). I am using Centos 6.5 and using RPM packages. </span><br />
<div>
<br /></div>
<div>
<b>Installing using RPMs</b></div>
<div>
<br /></div>
<div>
<div>
<span style="font-family: Courier New, Courier, monospace;">[root@localhost ~]# rpm -ivh mysql-community-server-5.7.5-0.6.m15.el6.i686.rpm mysql-community-client-5.7.5-0.6.m15.el6.i686.rpm mysql-community-libs-5.7.5-0.6.m15.el6.i686.rpm mysql-community-common-5.7.5-0.6.m15.el6.i686.rpm</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">Preparing... ########################################### [100%]</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;"> 1:mysql-community-common ########################################### [ 25%]</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;"> 2:mysql-community-libs ########################################### [ 50%]</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;"> 3:mysql-community-client ########################################### [ 75%]</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;"> 4:mysql-community-server ########################################### [100%]</span></div>
</div>
<div>
<br /></div>
<div>
<b>Starting MySQL Server</b></div>
<div>
<br /></div>
<div>
<div>
<span style="font-family: Courier New, Courier, monospace;">[root@localhost ~]# /etc/init.d/mysqld start</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">Initializing MySQL database: [ OK ]</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">Starting mysqld: [ OK ]</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">Securing the MySQL server deployment.</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">Connecting to MySQL server using password in '/root/.mysql_secret'</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">VALIDATE PASSWORD PLUGIN can be used to test passwords</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">and improve security. It checks the strength of password</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">and allows the users to set only those passwords which are</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">secure enough. Would you like to setup VALIDATE PASSWORD plugin?</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">Press y|Y for Yes, any other key for No: y</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">There are three levels of password validation policy:</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">LOW Length >= 8</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">MEDIUM Length >= 8, numeric, mixed case, and special characters</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">STRONG Length >= 8, numeric, mixed case, special characters and dictionary file</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">Please enter 0 = LOW, 1 = MEDIUM and 2 = STRONG: 2</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">By default, a MySQL installation has an anonymous user,</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">allowing anyone to log into MySQL without having to have</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">a user account created for them. This is intended only for</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">testing, and to make the installation go a bit smoother.</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">You should remove them before moving into a production</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">environment.</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">Remove anonymous users? (Press y|Y for Yes, any other key for No) : y</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">Success.</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">Normally, root should only be allowed to connect from</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">'localhost'. This ensures that someone cannot guess at</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">the root password from the network.</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">Disallow root login remotely? (Press y|Y for Yes, any other key for No) : y</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">Success.</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">By default, MySQL comes with a database named 'test' that</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">anyone can access. This is also intended only for testing,</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">and should be removed before moving into a production</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">environment.</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">Remove test database and access to it? (Press y|Y for Yes, any other key for No) : y</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;"> - Dropping test database...</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">Success.</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;"> - Removing privileges on test database...</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">Success.</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">Reloading the privilege tables will ensure that all changes</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">made so far will take effect immediately.</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">Reload privilege tables now? (Press y|Y for Yes, any other key for No) : y</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">Success.</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;"><br /></span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">All done!</span></div>
</div>
<div>
<br /></div>
<div>
-------------------------------------------------------------------------------------------------------<br />
<br />
A very long output but easy to follow, many improvements:<br />
<br />
* Password validation plugin is by default loaded and the password validation policy is set to 'STRONG'.<br />
* Installation removes test database and anonymous user accounts.<br />
* Installation creates only one 'root' account and automatically generates a password for this account..<br />
* Installation automatically remove permissions on non-existing test% databases.<br />
<br />
To login to the MySQL server, I would need to use random password generated by the installation that is located in <span style="font-family: 'Courier New', Courier, monospace;">/root/.mysql_secret </span><span style="font-family: Times, Times New Roman, serif;">and select a new password using SET PASSWORD() command.</span><br />
<span style="font-family: Times, Times New Roman, serif;"><br /></span>
<span style="font-family: Times, Times New Roman, serif;"><br /></span><span style="font-family: Times, Times New Roman, serif;"><b>SQL MODE Changes</b></span><br />
<span style="font-family: Times, Times New Roman, serif;"><b><br /></b></span>
<span style="font-family: Times, Times New Roman, serif;"><br /></span>
<span style="font-family: Times, Times New Roman, serif;">Strict SQL mode for transactional storage engines (STRICT_TRANS_TABLES) is now enabled by default. An error occurs for invalid or missing values in a data-change statement. The statement is aborted and rolled back. For example, if you wish to insert a value that exceeds the specified column width i.e. VARCHAR(20)</span><br />
<span style="font-family: Times, Times New Roman, serif;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">mysql> show create table t\G</span><br />
<span style="font-family: Courier New, Courier, monospace;">*************************** 1. row ***************************</span><br />
<span style="font-family: Courier New, Courier, monospace;"> Table: t</span><br />
<span style="font-family: Courier New, Courier, monospace;">Create Table: CREATE TABLE `t` (</span><br />
<span style="font-family: Courier New, Courier, monospace;"> `a` int(10) unsigned NOT NULL AUTO_INCREMENT,</span><br />
<span style="font-family: Courier New, Courier, monospace;"> `b` varchar(20) DEFAULT NULL,</span><br />
<span style="font-family: Courier New, Courier, monospace;"> PRIMARY KEY (`a`)</span><br />
<span style="font-family: Courier New, Courier, monospace;">) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8</span><br />
<span style="font-family: Courier New, Courier, monospace;">1 row in set (0.08 sec)</span><br />
<span style="font-family: Courier New, Courier, monospace;"><br /></span>
<span style="font-family: Courier New, Courier, monospace;">mysql> insert into t values (111, repeat('a',21));</span><br />
<br />
<span style="font-family: Courier New, Courier, monospace;">ERROR 1406 (22001): Data too long for column 'b' at row 1</span><br />
<span style="font-family: Times, Times New Roman, serif;"><br /></span>
<span style="font-family: Times, Times New Roman, serif;"><b><br /></b></span>
<span style="font-family: Times, Times New Roman, serif;"><b>Password Expiration Policy</b></span><br />
<span style="font-family: Times, Times New Roman, serif;"><b><br /></b></span>
<span style="font-family: Times, Times New Roman, serif;">User accounts would automatically expire after 360 days! this is great improvement. As you would want (wish) some of the accounts to definitely expire. At the same time you can disable password expiration for some of the accounts. You can read MySQL manuals to learn more about this feature <a href="http://dev.mysql.com/doc/refman/5.7/en/password-expiration-policy.html" target="_blank">here</a></span><br />
<span style="font-family: Times, Times New Roman, serif;"><br /></span>
<span style="font-family: Times, Times New Roman, serif;"><b>MySQL OLD Passwords</b></span><br />
<span style="font-family: Times, Times New Roman, serif;"><b><br /></b></span>
<span style="font-family: Times, Times New Roman, serif;">The mysql_old_password authentication plugin is removed. Accounts that use this plugin are disabled at startup and the server writes an “unknown plugin” message to the error log. For instructions on upgrading accounts that use this plugin, <a href="http://dev.mysql.com/doc/refman/5.7/en/account-upgrades.html" target="_blank">see</a></span><br />
<span style="font-family: Times, Times New Roman, serif;"><br /></span>
<span style="font-family: 'Courier New', Courier, monospace;"><br /></span>
<span style="font-family: 'Courier New', Courier, monospace;"><br /></span>
<span style="font-family: 'Courier New', Courier, monospace;"><br /></span>
<br />
<br />
<br /></div>
<div class="blogger-post-footer"><script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-8190616-1");
pageTracker._trackPageview();
} catch(err) {}</script></div>Aftab Khanhttp://www.blogger.com/profile/17201066985732943851noreply@blogger.com0tag:blogger.com,1999:blog-8545214922787541097.post-66596460517446195662013-10-29T07:35:00.001-07:002013-11-28T06:05:27.975-08:00Using MySQL with Multi-volume DRBD resource<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKkQHq9bwReWyvHTy5WkJnSIOWEAYj2HslFinUMjnWIFdhUFUDgd61lr9DWLA9LlhyvvQ0TRS4r_fMU2USPnkG7roDUlTcAKNZOrpuRQe_3UMQsGSwrO6l-JcBQkaCLTH-zKnl8OCGNNg/s1600/host1_etc_hosts.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><br /></a></div>
There are many different ways of achieving high availability for MySQL. DRBD (Distributed Replication Block Device) is one of the leading solutions for MySQL HA (High Availability), in this blog I would demonstrate how to configure, install and test MySQL and DRBD.<br />
<br />
<b>Quick overview of DRBD </b><br />
<br />
DRBD synchronizes data at the block device (typically a spinning or solid state disk) – transparent to the application, database and even the file system. DRBD requires the use of a journaling file system such as ext3 or ext4. For this solution it acts in an active-standby mode – this means that at any point in time the directories being managed by DRBD are accessible for reads and writes on exactly one of the two hosts and inaccessible (even for reads) on the other. Any changes made on the active host are synchronously replicated to the standby host by DRBD.<br />
<br />
<b><span style="font-size: large;">Pre-Requisites </span> </b><br />
<br />
Two servers, each with:<br />
<br />
* Redhat/Centos 6.3<br />
* Network connectivity<br />
* MySQL 5.5 or later<br />
* Unpartitioned space on the local disks to create a DRBD partitions, in this example I would use LVMs as DRBD backing device.<br />
<br />
For simplicity, servers are named as host1 and host2.<br />
host1: 192.168.0.6<br />
host2: 192.168.0.7<br />
<br />
Following configuration files are created:<br />
<br />
<b>/etc/hosts (host1)</b><br />
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKkQHq9bwReWyvHTy5WkJnSIOWEAYj2HslFinUMjnWIFdhUFUDgd61lr9DWLA9LlhyvvQ0TRS4r_fMU2USPnkG7roDUlTcAKNZOrpuRQe_3UMQsGSwrO6l-JcBQkaCLTH-zKnl8OCGNNg/s1600/host1_etc_hosts.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="52" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKkQHq9bwReWyvHTy5WkJnSIOWEAYj2HslFinUMjnWIFdhUFUDgd61lr9DWLA9LlhyvvQ0TRS4r_fMU2USPnkG7roDUlTcAKNZOrpuRQe_3UMQsGSwrO6l-JcBQkaCLTH-zKnl8OCGNNg/s400/host1_etc_hosts.png" width="400" /></a><br />
<br />
<b> /etc/hosts (host2)</b><br />
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgEJUw5wm3Q7RCmOV2blHg5RkohyphenhyphenFPpbyCPqMfKaaLka_x9QsBHNTWuapUVc0oo7u46xRMuArIxESHSf5II1g_Zy-033M1r05ePoqMryy6teZEapouM8PRtHUJZu1xEUigNvnf1rFBhGOI/s1600/host2_etc_hosts.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="52" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgEJUw5wm3Q7RCmOV2blHg5RkohyphenhyphenFPpbyCPqMfKaaLka_x9QsBHNTWuapUVc0oo7u46xRMuArIxESHSf5II1g_Zy-033M1r05ePoqMryy6teZEapouM8PRtHUJZu1xEUigNvnf1rFBhGOI/s400/host2_etc_hosts.png" width="400" /></a><br />
<br />
<b>Ensure </b><b><b>DRBD user-land tools are installed</b></b><br />
<br />
Firstly use <b>yum </b>to check that they aren’t already there (if “Repo” is set to “installed” then it is already installed):<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<b><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSaBG1PJCe_5KLkHzKQtMS6AFkBpZhAZDGDVR2dmeXM8o1Pzlxruyg-xwHbJXL0mlfcFooeONo_l3bhqWu2FzBEVxXfwK_kI4xbQq-dlveIs9IwshkYupPpXextbVtoYgfFbdjfr8fKko/s1600/host1_drbd84-utils.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="236" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSaBG1PJCe_5KLkHzKQtMS6AFkBpZhAZDGDVR2dmeXM8o1Pzlxruyg-xwHbJXL0mlfcFooeONo_l3bhqWu2FzBEVxXfwK_kI4xbQq-dlveIs9IwshkYupPpXextbVtoYgfFbdjfr8fKko/s400/host1_drbd84-utils.png" width="400" /></a></b></div>
<b><span style="font-weight: normal;"> Check if <b>kmod-drbd84</b> is installed. Please ensure that both modules should have same version number:</span><br />
<br />
</b><br />
<div class="separator" style="clear: both; text-align: center;">
<b><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJBWm7ZRMDIMthUByqSfxaASo6_aHZDq49h4pvggJ3lFM7IlNJrHHGsAY2wQkgqIbG8yhYY-cOmk30qK08M9zzcv815_59qpFEb-d6EH53oI-lutggM7mkCP0HmriM3xEE2iSDZX1m_bw/s1600/host1_kmod-drbd84-utils.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="210" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJBWm7ZRMDIMthUByqSfxaASo6_aHZDq49h4pvggJ3lFM7IlNJrHHGsAY2wQkgqIbG8yhYY-cOmk30qK08M9zzcv815_59qpFEb-d6EH53oI-lutggM7mkCP0HmriM3xEE2iSDZX1m_bw/s400/host1_kmod-drbd84-utils.png" width="400" /></a></b></div>
<b>
</b>
<br />
These packages don't come in the default yum repository, so you may have to download them:<br />
<pre class="literal-block"><span style="font-size: x-small;">wget http://elrepo.org/linux/elrepo/el6/x86_64/RPMS/kmod-drbd84-8.4.1-1.el6.elrepo.x86_64.rpm</span></pre>
<pre class="literal-block"><span style="font-size: x-small;">wget http://elrepo.org/linux/elrepo/el6/x86_64/RPMS/drbd84-utils-8.4.1-1.el6.elrepo.x86_64.rpm</span></pre>
<br />
And install it if not :<br />
<pre class="literal-block"><span style="font-size: x-small;">yum install drbd84-utils kmod-drbd84 -y</span></pre>
<pre class="literal-block"></pre>
<pre class="literal-block"></pre>
<pre class="literal-block"></pre>
<pre class="literal-block"></pre>
<pre class="literal-block"></pre>
<pre class="literal-block"></pre>
<pre class="literal-block"></pre>
<pre class="literal-block">The same steps should be performed on host2</pre>
<br />
<br />
<span style="font-size: large;"><b>Configure DRBD/FileSystem</b></span><br />
<br />
Confirm that you have a volume group available to spring LVMs<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgkX8-8pLpV1VpWZXKpn07x517dnYPU2bzX1F3_zZ5cvi_n2nVTCQjYHKX2TPSlhm-E6xnQVTbSa-F4K4b1x1sYFEIzix0RBguhCs_lgy6k8BkfvCVeqK21p9iygmWq31jEk8IOnSmaaT4/s1600/host1_vgdisplay.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="276" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgkX8-8pLpV1VpWZXKpn07x517dnYPU2bzX1F3_zZ5cvi_n2nVTCQjYHKX2TPSlhm-E6xnQVTbSa-F4K4b1x1sYFEIzix0RBguhCs_lgy6k8BkfvCVeqK21p9iygmWq31jEk8IOnSmaaT4/s400/host1_vgdisplay.png" width="400" /></a></div>
<br />
<pre class="literal-block"> </pre>
In this case I have Volume Group 'vg0' that has free 3Gb space. I would create two lvms on both hosts:<br />
<br />
<b><b>[root@host1 ~] </b>lvcreate --name data --size 1G vg0</b><br />
<b><b>[root@host1 ~] </b>lvcreate --name logs --size 1G vg0</b><br />
<br />
<b><b>[root@host2 ~] </b>lvcreate --name data --size 1G vg0</b><br />
<b><b>[root@host2 ~] </b>lvcreate --name logs --size 1G vg0</b><br />
<br />
<br />
Note: If you don't have any Volume Group available but have empty partition available. Click <a href="http://www.drbd.org/users-guide/ch-lvm.html" target="_blank">here</a> to learn more about how to create Volume Groups/LVMs.<br />
<br />
The new LVMs would be used as a resource, managed (and synchronized between hosts by DRBD); for this reason a new DRDB resource file must be created in the <b>/etc/drbd.d/ </b>directory; the contents should look like this:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgcMLK7rbTz1dHAAFu26TgoOqbpqxvLkbyaI5A8ybqIyiP2CT0GWon7emSqGX3bfm3QSr1KuKRfL5UNw4jIYoRvE1JKlAO18qDI1QxDHtm7ya7FIXxZlB1GgMjw7mUJzyE-AfVkqit5Z6M/s1600/host1_drbd_resource.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgcMLK7rbTz1dHAAFu26TgoOqbpqxvLkbyaI5A8ybqIyiP2CT0GWon7emSqGX3bfm3QSr1KuKRfL5UNw4jIYoRvE1JKlAO18qDI1QxDHtm7ya7FIXxZlB1GgMjw7mUJzyE-AfVkqit5Z6M/s1600/host1_drbd_resource.png" /></a></div>
<br />
The same configuration file must be copied over to the same location on the second host:<br />
<br />
<b>scp /etc/drbd.d/r0.res host2:/etc/drbd.d/</b><br />
<br />
At this point, I would disable firewall on host1 and host2 to allow communication on required ports (7789 and 7788)<br />
<br />
Next, meta data should be created for the DRBD resource (r0), on each host perform following:<br />
<br />
<b>[root@host1 ~]# drbdadm create-md r0</b><br />
<br />
<b><b>[root@host2 ~]# drbdadm create-md r0</b> </b><br />
<br />
Now we should start DRBD daemon on both hosts (run the command about the same time on each host, because DRBD need to communicate with each other).<br />
<br />
<b>[root@host1 ~]# /etc/init.d/drbd start</b><br />
<br />
<b><b>[root@host2 ~]# </b></b><b><b><b>/etc/init.d/drbd start</b></b></b><br />
<br />
In order to create the file systems (and go on to store useful data in it), one of the hosts must be made<br />
primary for the 'r0' resource:<br />
<br />
<br />
<b><b>[root@host1 ~]# </b>drbdadm -- --overwrite-data-of-peer primary all</b><br />
<br />
Now that the devices are available on <i>drbd0/drbd1, </i>so it is possible to create a file system on it<b><br /> </b><br />
<b><b><b>[root@host1 ~]# </b></b>mkfs -t ext4 /dev/drbd0</b><br />
<b><b><b>[root@host1 ~]# </b></b>mkfs -t ext4 /dev/drbd1</b><br />
<br />
<b><span style="font-size: large;">Install and configure MySQL</span> </b><br />
MySQL binaries should be installed on both of the servers<b>.</b><br />
<br />
<b><b><b><b>[root@host1 ~]# yum install mysql-server mysql -y</b></b></b></b><br />
<b><b><b><b><b><b><b><b>[root@host2 ~]# yum install mysql-server mysql -y</b></b></b></b> </b></b></b></b><br />
<b><b><b><b><br /></b></b></b></b>
Create following directories on both hosts:<br />
<br />
<b>mkdir /var/lib/mysql_data_drbd</b><br />
<b>mkdir /var/lib/mysql_binlog_drbd</b><br />
<b><br /></b>
<b>chown -R mysql:mysql /var/lib/mysql_data_drbd</b><br />
<b>chown -R mysql:mysql /var/lib/mysql_logs_drbd</b><br />
<br />
At this stage we should mount DRBD devices (on primary host1), so that we can initialize MySQL data directory:<br />
<br />
<b>[root@host1 ~]# mount /dev/<i>drbd0 </i> /var/lib/mysql_data_drbd</b><br />
<b>[root@host1 ~]# mount /dev/<i>drbd1</i> /var/lib/mysql_logs_drbd</b><br />
<br />
<b>[root@host1 ~]# mkdir </b><b>/var/lib/mysql_data_drbd/data</b><br />
<b>[root@host1 ~]# mkdir </b><b>/var/lib/mysql_logs_drbd/logs</b><br />
<br />
Ensure that host1 is currently primary and <i>DRBD </i>backing devices are up<b>.</b><br />
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtdaurWI-XXm9j2NlqAW9L95CZlC7zo5mtMtoLNY5SxVNDkWDyz1Od4b_fOt8EmW8KkB9nA7ORRYhTQt5roZOxUUu1Fcb6qPrftoyIKkY4v8LJsfh_R_EqRWmpuiHRPjdtW-TnxGGocH8/s1600/host1_drbd_status.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="41" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtdaurWI-XXm9j2NlqAW9L95CZlC7zo5mtMtoLNY5SxVNDkWDyz1Od4b_fOt8EmW8KkB9nA7ORRYhTQt5roZOxUUu1Fcb6qPrftoyIKkY4v8LJsfh_R_EqRWmpuiHRPjdtW-TnxGGocH8/s640/host1_drbd_status.png" width="640" /></a> <br />
<br />
Edit the <i>/var/lib/mysql_data_drbd/my.cnf </i>file and set <i>datadir=/var/lib/mysql_data_drbd/data </i>and <i>log_bin=/var/lib/mysql_logs_drbdb/logs</i> in the [mysqld]<br />
section. Also ensure that the socket is configured to <i>/var/lib/mysql/mysql.sock</i> and the pid file to<br />
<i>/var/lib/mysql/mysql.pid</i>.<br />
<br />
Here is MySQL configuration file on host1:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhar6DSy8O0tiN8je-XVXUr4nOke5OmtSibQj0VDYU5gC6qeydsbYDTiNIa7kdEvQFztaT4o4_uaCvQcAN7nbEXzhHEBv1S181axPFr7Lged4EqDW-aGfic8FPnOf5Ox5ExGZm84NUkXY0/s1600/host1_my.cnf.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="193" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhar6DSy8O0tiN8je-XVXUr4nOke5OmtSibQj0VDYU5gC6qeydsbYDTiNIa7kdEvQFztaT4o4_uaCvQcAN7nbEXzhHEBv1S181axPFr7Lged4EqDW-aGfic8FPnOf5Ox5ExGZm84NUkXY0/s400/host1_my.cnf.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<br />
<br />
Create symlink for MySQL options file on both hosts:<br />
<br />
<b><b>[root@host1 ~]# </b>rm -f /etc/my.cnf</b><br />
<b><b>[root@host1 ~]# </b>cd /etc</b><br />
<b><b>[root@host1 ~]# </b>ln -s /var/lib/mysql_data_drbd/my.cnf my.cnf</b><br />
<br />
<b><b>[root@host2 ~]# </b>rm -f /etc/my.cnf</b><br />
<b><b>[root@host2 ~]# </b>cd /etc</b><br />
<b><b>[root@host2 ~]# </b>ln -s /var/lib/mysql_data_drbd/my.cnf my.cnf</b><br />
<br />
Now install default MySQL database files:<br />
<br />
<b><b>[root@host1 ~]# </b>mysql_install_db --no-defaults --datadir=/var/lib/mysql_data_drbdb/data --user=mysql</b><br />
<br />
<b><span style="font-size: large;">Start MySQL server</span></b><br />
Lets start MySQL server and insert some test data:<br />
<br />
<b><b><b>[root@host1 ~]# </b></b>mysqld --defaults-file=/etc/my.cnf &</b><br />
<b><b><b><b><b><b>[root@host1 ~]# mysql -e "CREATE DATABASE IF NOT EXISTS mysqlslap; USE mysqlslap; CREATE TABLE IF NOT EXISTS test (a INT, b VARCHAR(200)); INSERT INTO test VALUES (1, 'mysql drbd')"</b></b><b><b><b><b></b></b></b></b></b></b></b></b><br />
<br />
<h3>
Manual failover</h3>
<div>
It is possible to migrate MySQL/DRBD resource to alternative host, steps to be performed:</div>
<div>
On host1 (currently primary):</div>
<div>
<br /></div>
<div>
# Stop mysql instance</div>
<div>
<b>[root@host1 ~]# mysqladmin -uroot -p shutdown</b></div>
<div>
# umount drdb filesystems</div>
<div>
<b>[root@host1 ~]# umount /var/lib/mysql_data_drbd; umount /var/lib/mysql_logs_drbd</b></div>
<div>
# Switch DRBD to SECONDARY mode</div>
<div>
<b>[root@host1 ~]# drbdadm secondry r0</b></div>
<div>
<b><br /></b></div>
<div>
On host2:</div>
<div>
# Make this node PRIMARY</div>
<div>
<b>[root@host2 ~]# drbdadm primary r0</b></div>
<div>
<div>
# mount drdb filesystems</div>
<div>
<b>[root@host1 ~]# mount /dev/drbd0 /var/lib/mysql_data_drbd</b></div>
<div>
<b>[root@host1 ~]#</b><b> mount /dev/drbd1 /var/lib/mysql_logs_drbd</b></div>
</div>
<div>
<b># Start MySQL server</b></div>
<div>
<b>[root@host1 ~]# </b><b>mysqld --defaults-file=/etc/my.cnf &</b></div>
<div>
<b><br /></b></div>
<div>
<b><br /></b></div>
<div class="blogger-post-footer"><script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-8190616-1");
pageTracker._trackPageview();
} catch(err) {}</script></div>Aftab Khanhttp://www.blogger.com/profile/17201066985732943851noreply@blogger.com1tag:blogger.com,1999:blog-8545214922787541097.post-24304912130249265672013-06-10T07:31:00.001-07:002013-06-10T07:35:34.622-07:00Restrictions on Replication with GTIDsI came across some issues when converting MySQL regular replication to replication with GTIDs.<br />
<div>
Keywords used in this document:</div>
<div>
<div>
<div>
<b><br /></b></div>
<div>
<b>MySQL replication - </b>Replication enables data from one MySQL database server (the master) to be replicated to one or more MySQL database servers (the slaves). Replication is asynchronous by default.</div>
<div style="font-weight: bold;">
<br /></div>
</div>
<div>
<b>GTID</b> - A global transaction identifier (GTID) is a unique identifier created and associated with each transaction when it is committed on the server of origin (master). This identifier is unique not only to the server on which it originated, but is unique across all servers in a given replication setup. There is a 1-to-1 mapping between all transactions and all GTIDs.For more information about GTIDs click <a href="http://dev.mysql.com/doc/refman/5.6/en/replication-gtids-concepts.html" target="_blank">here</a></div>
</div>
<div>
<br />
<b>Assumptions:</b><br />
MySQL replication with GTIDs is up and running using <span style="background-color: white; font-family: Helvetica, Arial, sans-serif; font-size: 14px; line-height: 25px;"> </span><a class="link" href="http://dev.mysql.com/doc/refman/5.6/en/replication-options-gtids.html#option_mysqld_enforce-gtid-consistency" style="background-color: white; border: 0px; color: #015a84; font-family: Helvetica, Arial, sans-serif; font-size: 14px; line-height: 25px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"><code class="option" style="border: 0px; color: #0e4075; font-family: 'Courier New', Courier, fixed, monospace; font-size: 13.5px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">--enforce-gtid-consistency</code></a></div>
<div>
<br />
Restrictions on Replication with GTIDs is documented <a href="http://dev.mysql.com/doc/refman/5.6/en/replication-gtids-restrictions.html" target="_blank">here</a></div>
<div>
<br /></div>
<div>
1. <b>Temporary tables </b>- CREATE and DROP TEMPORARY tables are not supported inside transaction. e.g.</div>
<div>
<br /></div>
<pre>START TRANSACTION;
Query OK, 0 rows affected (0.00 sec)
CREATE TEMPORARY TABLE t2 like t;
ERROR 1787 (HY000): When ENFORCE_GTID_CONSISTENCY = 1, the statements CREATE TEMPORARY TABLE and DROP TEMPORARY TABLE can be executed in a non-transactional context only, and require that AUTOCOMMIT = 1.
</pre>
<br />
2. <b>Updates involving non-transactional storage engines - </b>It is not possible to mix non-transactional tables (such as MYISAM) with innodb tables within the same transaction.<br />
The same issue can arise if:<br />
<br />
<ul>
<li>When master and slave database use different storage engines for their respective versions of the same table. e.g. Table 'A' on master database use Innodb, but the same table on replication slave host use MyISAM storage engine with table 'A'.</li>
<li>When MySQL configuration on master/slave hosts use different binary log format e.g. master host is configured to use 'ROW' format and slave host is using 'STATEMENT'</li>
</ul>
<br />
3.<b> CREATE TABLE .... SELECT - </b>It is not supported to perform such type of statements e.g.<br />
<pre>create table t2 select * from t;
ERROR 1786 (HY000): CREATE TABLE ... SELECT is forbidden when ENFORCE_GTID_CONSISTENCY = 1.
</pre>
<b><br /></b>
<b>Conclusion</b><br />
As work around CREATE/DROP temporary table statements can be performed outside transaction and CREATE TABLE ... SELECT could be performed using two statements such as CREATE TABLE t1; INSERT INTO t1 SELECT. Similarly, developers would be forced to convert non-transnational tables (e.g. MYISAM) to INNODB. In short, it would be a major code change for the existing application.
<div class="blogger-post-footer"><script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-8190616-1");
pageTracker._trackPageview();
} catch(err) {}</script></div>Aftab Khanhttp://www.blogger.com/profile/17201066985732943851noreply@blogger.com0tag:blogger.com,1999:blog-8545214922787541097.post-42544436091593290802013-05-14T03:43:00.005-07:002013-05-15T01:02:55.950-07:00MySQL slow query example of Index Merge IntersectionMy client reported a sudden slow query performance issue, the same query has been running fine for a long time and used to complete in under fraction of a second and now it's taking average 30 seconds to complete. However, the same query runs fast on development server but slow in production.<br />
MySQL processlist shows that there are many threads running the same slow query, and the back log continue to grow...<br />
<br />
Looking at SQL, it is not complex:<br />
<br />
<pre>SELECT COUNT(*)
FROM tblA
WHERE tblA.fkA_ID = 38926722
AND tblA.fkAType_ID = 1
AND tblA.fkADetail_ID = 476
AND tblA.`Date` = '2013-05-10 07:14:41'
AND tblA.Time = '2013-05-10 07:14:41'
</pre>
<br />
And the EXPLAIN output is:
<br />
<pre> id: 1
select_type: SIMPLE
table: tblA
type: index_merge
possible_keys: FK_A_ID,FK_fkAType_ID,FK_fkADetail_ID,IX_Date
key: FK_ApmAudit2ApmCase,FK_ApmAudit2ApmAuditType
key_len: 4,1
ref: NULL
rows: 1
Extra: Using intersect(FK_A_ID,FK_fkAType_ID); Using where
1 row in set (0.00 sec)
</pre>
<br />
At first glance, it does not look too bad. MySQL is using two different indexes to search 1 out of 66M rows to return the count of total rows. It is worth mentioning here that column fkAType_ID is not very selective i.e. it holds value 1 or 2. Sadly, 90% of the rows had value 1. This means query is looking at millions of rows before doing index merge with column fkA_ID.<br />
<br />
Ok, we know now what's wrong with the query, let's see what options do we have to to optimize this query:?<br />
<br />
A) The table hasn't been purged for the past several months; this couldn't be done at this time<br />
B) Pass index hints to the query optimizer to favor index on fkA_ID column.
<br />
<pre>SELECT COUNT(*)
FROM tblA USE INDEX (FK_A_ID)
WHERE tblA.fkA_ID = 38926722
AND tblA.fkAType_ID = 1
AND tblA.fkADetail_ID = 476
AND tblA.`Date` = '2013-05-10 07:14:41'
AND tblA.Time = '2013-05-10 07:14:41'
Query OK, 1 row affected (0.20 sec)
</pre>
<br />
Query completed in a fraction of a second, compared to 30 seconds!
Lets look at EXPLAIN output:
<br />
<pre>*************************** 1. row ***************************
id: 1
select_type: SIMPLE
table: tblA
type: ref
possible_keys: FK_A_ID
key: FK_A_ID
key_len: 4
ref: const
rows: 179
Extra: Using where
1 row in set (0.00 sec)
</pre>
<pre></pre>
Once the backlog consumed, in the next available maintenance window, we purged historic data, removed index hints and added following index to the table:
<br />
<pre>ALTER TABLE tblA
DROP INDEX `FK_A_ID`,
ADD INDEX `FK_A_ID_DATE` (`fkA_ID`,`Date`)
</pre>
Note: index on column FK_fkAType_ID is needed due to foreign key constraint. The table structure info:
<pre>
CREATE TABLE `tblA` (
`pkID` int(10) unsigned NOT NULL AUTO_INCREMENT,
`fkApplication_ID` smallint(5) unsigned NOT NULL,
`fkA_ID` int(10) unsigned NOT NULL,
`fkAType_ID` tinyint(3) unsigned NOT NULL,
`Date` date NOT NULL,
...
KEY `FK_Application` (`fkApplication_ID`),
KEY `FK_fkAType_ID` (`fkAType_ID`),
KEY `IX_Date` (`Date`),
KEY `FK_A_ID` (`fkA_ID`),
...
CONSTRAINT `FK_AType` FOREIGN KEY (`fkAType_ID`) REFERENCES `tblAType` (`pkAType_ID`),
...
) ENGINE=InnoDB AUTO_INCREMENT=505970021 DEFAULT CHARSET=utf8
</pre>
<div class="blogger-post-footer"><script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-8190616-1");
pageTracker._trackPageview();
} catch(err) {}</script></div>Aftab Khanhttp://www.blogger.com/profile/17201066985732943851noreply@blogger.com2tag:blogger.com,1999:blog-8545214922787541097.post-32807451032306559882013-04-12T01:47:00.001-07:002013-08-12T06:56:18.985-07:00Mongo db stress test using different writeConcernThe aim is to determine how mongo performs using different writeConcern, which control the acknowledgment/quality of the write operations with various options, such as:<br />
ACKNOWLEDGED [default]<br />
UNACKNOWLEDGED<br />
JOURNALED<br />
JOURNALED_SAFE<br />
SAFE<br />
FSYNCED<br />
FSYNC_SAFE<br />
WriteConern options are documented here: <b>http://docs.mongodb.org/manual/core/write-concern/</b><br />
<b><br /></b>
<b>Test results: </b>Total 200k documents are injected into 'user' collection using 4, 8 and 16 parallel threads<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilL30vXL0lJMFGyWQ79oXuyLLwL7iqmNPDfMPiGSFqp8mvOcuqmIRZjwH-GGs1PyURsvmvvlntAjOMLUYlZArqCgqWgeZ65L8drpU-m-pvlAGat2yvcdIWhmqstU2kq37WmySH7gNBaSA/s1600/writeConcern.JPG" imageanchor="1"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilL30vXL0lJMFGyWQ79oXuyLLwL7iqmNPDfMPiGSFqp8mvOcuqmIRZjwH-GGs1PyURsvmvvlntAjOMLUYlZArqCgqWgeZ65L8drpU-m-pvlAGat2yvcdIWhmqstU2kq37WmySH7gNBaSA/s320/writeConcern.JPG" /></a><br />
<br />
UNACKNOWLEDGED option is the fastest of all but not safe, on other hand FSYNC_SAFE is the most safe option but is the slowest of all..<div class="blogger-post-footer"><script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-8190616-1");
pageTracker._trackPageview();
} catch(err) {}</script></div>Aftab Khanhttp://www.blogger.com/profile/17201066985732943851noreply@blogger.com0tag:blogger.com,1999:blog-8545214922787541097.post-70602342918255251522013-04-12T01:36:00.003-07:002013-04-15T07:01:00.180-07:00Protecting MongoDB Server with Authentication<br />
<div style="background-color: white; font-family: Arial, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 17.328125px; margin-bottom: 10px; margin-top: 10px; padding: 0px;">
MongoDB supports a simple authentication model that allows the administrator to restrict access to databases on a per user basis.</div>
<div style="background-color: white; font-family: Arial, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 17.328125px; margin-bottom: 10px; margin-top: 10px; padding: 0px;">
MongoDB supports individual access control records on each database that are stored in a special system.users collection. For normal users to have access to two databases (e.g., db1 and db2), their credentials and rights must be added to both databases.</div>
<div style="background-color: white; font-family: Arial, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 17.328125px; margin-bottom: 10px; margin-top: 10px; padding: 0px;">
<span style="background-color: transparent;">Note: Before you enable authentication on your server, make sure you have added your admin users to the admin database; if you enable authentication before adding the admin users, you will not be able to perform any actions on your database.</span><br />
<span style="color: maroon; font-size: 15pt; line-height: normal;"><br /></span>
<span style="color: maroon; font-size: 15pt; line-height: normal;">Adding an Admin User</span><br />
<span style="color: maroon; font-size: 15pt; line-height: normal;"><br /></span>
Adding the admin user is as simple as changing to the admin database and using the <a class="external-link" href="http://docs.mongodb.org/manual/reference/method/db.addUser/" rel="nofollow" style="color: #326ca6; outline: none; text-decoration: none;">addUser</a>() command:<br />
<pre>$ mongo
MongoDB shell version: 2.2.3
connecting to: test
> use admin
switched to db admin
> show collections
> db.addUser("admin","xxxxx")
{
"user" : "admin",
"readOnly" : false,
"pwd" : "9f3121efccbe3fef09a799d5e63077c2",
"_id" : ObjectId("5148475c7719ce8dd603e52d")
}
>
> exit
bye
</pre>
<pre></pre>
<pre><span style="font-family: Arial, Helvetica, FreeSans, sans-serif; white-space: normal;">Note: Any users added to the special admin database will have the same access rights on all databases</span></pre>
<pre><span style="color: maroon; font-family: Arial, Helvetica, FreeSans, sans-serif; font-size: 15pt; line-height: normal; white-space: normal;">
</span></pre>
<pre><span style="color: maroon; font-family: Arial, Helvetica, FreeSans, sans-serif; font-size: 15pt; line-height: normal; white-space: normal;">Enabling Authentication</span></pre>
<pre><div style="font-family: Arial, Helvetica, FreeSans, sans-serif; margin-bottom: 10px; margin-top: 10px; padding: 0px; white-space: normal;">
Now you need to alter your server's configuration to enable authentication. Do so by stopping your server and adding --auth to the startup parameters.</div>
</pre>
<pre>$ grep auth /etc/mongod-rs0-1.conf
auth = true
$ sudo mongod --dbpath /mnt/mongodb/data/rs0-1-db --shutdown
killing process with pid: 26501
[1]+ Done sudo nohup mongod --config /etc/mongod-rs0-1.conf
</pre>
<pre><span style="font-family: Arial, Helvetica, FreeSans, sans-serif; white-space: normal;"><b>Restart mongoDB:</b></span></pre>
</div>
<pre>$ sudo nohup mongod --config /etc/mongod-rs0-1.conf &
[1] 26982
[akhan2@eugenius ~]$ nohup: appending output to `nohup.out'
</pre>
<pre><span style="background-color: white; font-family: Arial, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 17.328125px; white-space: normal;">
</span></pre>
<pre><b><span style="background-color: white; font-family: Arial, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 17.328125px; white-space: normal;">Authentication is done using </span><a class="external-link" href="http://docs.mongodb.org/manual/reference/method/db.auth/" rel="nofollow" style="background-color: white; color: #326ca6; font-family: Arial, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 17.328125px; outline: none; text-decoration: none; white-space: normal;">db.auth</a><span style="background-color: white; font-family: Arial, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 17.328125px; white-space: normal;">():</span></b></pre>
<pre><b><span style="background-color: white; font-family: Arial, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 17.328125px; white-space: normal;">
</span></b></pre>
<pre>> db.auth("admin","xxxxx");
1
</pre>
<pre><h3 style="background-color: white; font-family: Arial, Helvetica, FreeSans, sans-serif; font-size: 15pt; margin: 28px 0px 4px; padding: 0px; white-space: normal;">
<span style="color: maroon;">Adding a Read-Only User</span></h3>
<div style="background-color: white; font-family: Arial, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 17.328125px; margin-bottom: 10px; margin-top: 10px; padding: 0px; white-space: normal;">
The addUser() function includes an additional parameter that allows you to create a user that has only read-only permissions. The MongoDB client will throw an exception if a process authenticated as the newly created user attempts to do anything that would result in a change to the contents of the database. The following example gives a user access to the database for status monitoring or reporting purposes:</div>
<div style="background-color: white; font-family: Arial, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 17.328125px; margin-bottom: 10px; margin-top: 10px; padding: 0px; white-space: normal;">
First connect to mongo db as 'admin' user:</div>
</pre>
<pre>> use admin
switched to db admin
> db.auth("admin","123");
1
</pre>
Grant Read-Only permission to user 'userA' on test db:
<br />
<pre>> use test
switched to db test
> db.addUser("readuser","xxxxx",true);
{
"user" : "userA",
"readOnly" : true,
"pwd" : "e982ddebe2d61f96d42e78cd2033a69f",
"_id" : ObjectId("51484a69ce8d584df56af233")
}
</pre>
<pre></pre>
<pre><span style="background-color: white; font-family: Arial, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 17.328125px; white-space: normal;"><b>Test 'userA' authentication:</b></span></pre>
<pre><span style="background-color: white; font-family: Arial, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 17.328125px; white-space: normal;"><b>
</b></span></pre>
<pre>$ mongo
MongoDB shell version: 2.2.3
connecting to: test
> use test
switched to db test
> db.auth("userA","xxxx");
1
> db.akhan.find();
{ "_id" : ObjectId("514846197876222c62329f27"), "Ad" : 999919 }
{ "_id" : ObjectId("514846197876222c62329f28"), "Ad" : 999920 }
</pre>
<pre></pre>
<pre><h3 style="background-color: white; font-family: Arial, Helvetica, FreeSans, sans-serif; font-size: 15pt; margin: 28px 0px 4px; padding: 0px; white-space: normal;">
<span style="color: maroon;">Deleting a User</span></h3>
<div style="background-color: white; font-family: Arial, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 17.328125px; margin-bottom: 10px; margin-top: 10px; padding: 0px; white-space: normal;">
To remove a user from a database, simply use the normal remove() function for a collection. The following example removes the user just added; note that you have to authenticate against the admin database before you can remove the user:</div>
</pre>
<pre>> use test
switched to db test
> db.system.users.remove({username:"userA"})
</pre>
<div class="blogger-post-footer"><script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-8190616-1");
pageTracker._trackPageview();
} catch(err) {}</script></div>Aftab Khanhttp://www.blogger.com/profile/17201066985732943851noreply@blogger.com1tag:blogger.com,1999:blog-8545214922787541097.post-2726475411536981742013-04-04T08:18:00.001-07:002014-01-06T03:14:20.198-08:00Minimize MySQL replication lag<span style="background-color: white; font-family: Arial, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 17.328125px;">Replication lag occurs in many MySQL deployments. This often happens due to slow insert/update/delete query that cause the slave to fall behind. However, it could also happen due to high volume of writes to the master database. One of my clients (who use MySQL 5.1) reported replication lag on a </span><tt style="background-color: white; font-size: 13px; line-height: 17.328125px;">slave host,</tt><span style="background-color: white; font-family: Arial, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 17.328125px;"> there was no stuck/long query running to cause slave to fall behind. And MySQL process-list show that it's reading/applying events from relay log (i.e. from local copy of master binary logs):</span><br />
<span style="background-color: white; font-family: Arial, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 17.328125px;"></span>
<br />
<pre>| 2 | system user | | NULL | Connect | 779612 | Waiting for master to send event | NULL |
| 3 | system user | | NULL | Connect | 4215 | Reading event from the relay log | NULL |
</pre>
And the replication latency continue to grow: "Seconds_Behind_Master: 4234"<br />
<span style="background-color: white; font-family: Arial, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 17.328125px;">When we look at MySQL dashboard to check on database activity graph (see below), its doing only avg 170 inserts/second. </span><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-FZ98zjbwSJc1KhyHI10cyZL_rk8sgqE4Aq0Mpaz0d0Coiw4Ou3W5KN_dF9Ms0JeVG6WD8TJxZGHCU_mqcq71sni_UAKxMf754xBzQT-S1sa8PZVHYR8Jh7lIgNbAvg5Gicxev2QNE2U/s1600/replication_lag_minnow_before.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-FZ98zjbwSJc1KhyHI10cyZL_rk8sgqE4Aq0Mpaz0d0Coiw4Ou3W5KN_dF9Ms0JeVG6WD8TJxZGHCU_mqcq71sni_UAKxMf754xBzQT-S1sa8PZVHYR8Jh7lIgNbAvg5Gicxev2QNE2U/s320/replication_lag_minnow_before.JPG" height="198" width="320" /></a></div>
<span style="background-color: white; font-family: Arial, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 17.328125px;"><br /></span>
<span style="background-color: white; font-family: Arial, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 17.328125px;">MySQL config for replication slave hosts can be configured to behave differently, the benefit is to help assist with replication catch-up. In this scenario we changed the value of </span><span style="background-color: #cccccc; color: #666666; font-family: 'Trebuchet MS', Trebuchet, sans-serif; font-size: 13px; line-height: 18px; text-align: justify;"> innodb_flush_log_at_trx_commit </span><span style="background-color: white; font-family: Arial, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 17.328125px;"> to 2 from default 1. </span><span style="background-color: white; font-family: Arial, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 17.328125px;">After this change, significant increase in db activity was observed, replication lag started to reduce sharply, and replication caught up with MySQL database under 5 mins, see below db activity graph:</span><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHj7EQ2v38sJWVe520Zpva7XqjDWEQh13ErY5_ht1x2odWTfCpgVPF8PQccW5nrLR_zZK5mb9wVYYND7CB4tSv5lnq9A3WrmtWgXs09_u3FjXvO4nGGKDQEOLC5h3DWJpuUzgeRgT7LJE/s1600/replication_lag_minnow_after.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHj7EQ2v38sJWVe520Zpva7XqjDWEQh13ErY5_ht1x2odWTfCpgVPF8PQccW5nrLR_zZK5mb9wVYYND7CB4tSv5lnq9A3WrmtWgXs09_u3FjXvO4nGGKDQEOLC5h3DWJpuUzgeRgT7LJE/s320/replication_lag_minnow_after.JPG" height="198" width="320" /></a></div>
<br />
<span style="background-color: white; font-family: Arial, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 17.328125px;"><br /></span><div class="blogger-post-footer"><script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-8190616-1");
pageTracker._trackPageview();
} catch(err) {}</script></div>Aftab Khanhttp://www.blogger.com/profile/17201066985732943851noreply@blogger.com2tag:blogger.com,1999:blog-8545214922787541097.post-28004911050212737222013-02-28T08:56:00.002-08:002013-04-15T07:00:15.722-07:00MySQL 5.6 - Online DDL Operations<span style="background-color: white; color: #555555; font-family: arial, helvetica, sans-serif; font-size: 12px; line-height: 18px;">MySQL 5.6 supports several kinds of Online DDL operations on Innodb tables, so it is now possible to perform DML operations such as insert, update, delete and select operations on a table while DDL operation on the subject table is in progress. For more details I strongly advise you to read MySQL docs <a href="http://dev.mysql.com/doc/refman/5.6/en/innodb-online-ddl.html" target="_blank">here</a> and <a href="http://dev.mysql.com/doc/refman/5.6/en/innodb-create-index-concurrency.html" target="_blank">here</a>. In this Blog I would demonstrate few quick examples:</span><br />
<span style="background-color: white; color: #555555; font-family: arial, helvetica, sans-serif; font-size: 12px; line-height: 18px;"><br /></span>
<span style="background-color: white; color: #555555; font-family: arial, helvetica, sans-serif;"><span style="font-size: 12px; line-height: 18px;"><b>a) Remove column from table 't1'</b> - DML operations can proceed while DDL is in progress i.e. ALTER TABLE .. DROP column..</span></span><br />
<span style="background-color: white; color: #555555; font-family: arial, helvetica, sans-serif; font-size: 12px; line-height: 18px;"><br /></span>
<br />
<pre style="background-color: #eeeeee; border: 1px dashed rgb(153, 153, 153); font-family: 'Andale Mono', 'Lucida Console', Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"><code>mysql >show processlist;
+-----+------+-----------+------+---------+------+----------------+----------------------------------+
| Id | User | Host | db | Command | Time | State | Info |
+-----+------+-----------+------+---------+------+----------------+----------------------------------+
| 67 | root | localhost | test | Query | 0 | init | show processlist |
| 604 | root | localhost | test | Query | 3 | <span style="color: blue;"><u><b>altering table </b></u>| alter table t1 drop column data2</span><span style="color: red;"> </span>|
+-----+------+-----------+------+---------+------+----------------+----------------------------------+
2 rows in set (0.00 sec)
mysql ><b><span style="color: black;">insert into t1</span> values (null,'xxxx','yyyy');</b>
Query OK, 1 row affected (0.00 sec)
mysql ><b><u><span style="color: black;">select * from t1</span> where id=2</u></b>;
+----+----------------------------------------------------+-------+
| id | data | data2 |
+----+----------------------------------------------------+-------+
| 2 | aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa | a |
+----+----------------------------------------------------+-------+
1 row in set (0.00 sec)
</code></pre>
<span style="background-color: white; color: #555555; font-family: arial, helvetica, sans-serif; font-size: 12px; line-height: 18px;"><br /></span>
<span style="background-color: white; color: #555555; font-family: arial, helvetica, sans-serif; font-size: 12px; line-height: 18px;"><b>b) Add new column table 't1'</b> - DML operations can proceed as long as they do not access the new column that is being added to the table:</span><br />
<span style="background-color: white; color: #555555; font-family: arial, helvetica, sans-serif; font-size: 12px; line-height: 18px;"><br /></span>
<br />
<pre style="background-color: #eeeeee; border: 1px dashed rgb(153, 153, 153); font-family: 'Andale Mono', 'Lucida Console', Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"><code>mysql>show processlist;
+-----+------+-----------+------+---------+------+----------------+---------------------------------------------------------+
| Id | User | Host | db | Command | Time | State | Info |
+-----+------+-----------+------+---------+------+----------------+---------------------------------------------------------+
| 67 | root | localhost | test | Query | 0 | init | show processlist |
| 604 | root | localhost | test | Query | 38 | <span style="color: blue;"><b>altering table</b> | alter table t1 add column data2 varchar(20) default 'a' </span>|
+-----+------+-----------+------+---------+------+----------------+---------------------------------------------------------+
2 rows in set (0.00 sec)
mysql>insert into test.t1 values (null,'xxxx');
Query OK, 1 row affected (0.02 sec)
<span style="color: red;">mysql>insert into test.t1 values (null,'xxxx','yyyy');
ERROR 1136 (21S01): Column count doesn't match value count at row 1</span>
</code></pre>
<div class="blogger-post-footer"><script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-8190616-1");
pageTracker._trackPageview();
} catch(err) {}</script></div>Aftab Khanhttp://www.blogger.com/profile/17201066985732943851noreply@blogger.com5tag:blogger.com,1999:blog-8545214922787541097.post-8496582492441663342013-02-25T09:51:00.000-08:002013-04-15T06:59:05.002-07:00Replication checksums in MySQL 5.6Replication checksums is one of the listed new features of MySQL 5.6 , but data integrity might break as documented here <a href="http://www.mysqlperformanceblog.com/2013/02/15/replication-checksums-in-mysql-5-6/" target="_blank">replication-checksum</a>. In reality this feature is not completely new to MySQL, in MySQL 5.5, and earlier replication checksums can be used by using SSL replication as a workaround. You can learn more about SSL replication <a href="http://dev.mysql.com/doc/refman/5.1/en/replication-solutions-ssl.html" target="_blank">here</a>. Similarly you can see my blog post about SSL connections with MySQL <a href="http://mysqlopt.blogspot.co.uk/2010/05/using-ssl-connections-with-mysql.html" target="_blank">here</a>.<br />
Please note, <u>by default replication checksums are enabled.</u> However following variables can be used to enable/disable checksums with master/relay logs:<br />
<br />
a) <b>Binlog_checksum</b> - Its a dynamic variable. The default value is CRC32. This variable causes the master to write a checksum for each event in the binary log<br />
<br />
When enabled binary log provides the following information:<br />
<!-- HTML generated using hilite.me --><br />
<div style="background: #ffffff; background: white; border-width: .1em .1em .1em .8em; border: solid gray; color: black; overflow: auto; padding: .2em .6em; width: auto;">
<table><tbody>
<tr><td><pre style="line-height: 125%; margin: 0;"> 1
2
3
4
5
6
7
8
9
10
11
12
13
14</pre>
</td><td><pre style="line-height: 125%; margin: 0;"><span style="background-color: #f0a0a0; color: #f00000;">#</span><span style="color: #0000d0; font-weight: bold;">130225</span> <span style="color: #0000d0; font-weight: bold;">15</span><span style="color: #303030;">:</span><span style="color: #0000d0; font-weight: bold;">33</span><span style="color: #303030;">:</span><span style="color: #0000d0; font-weight: bold;">56</span> server id <span style="color: #0000d0; font-weight: bold;">1</span> end_log_pos <span style="color: #0000d0; font-weight: bold;">384</span> CRC32 <span style="color: #005080; font-weight: bold;">0x280a5e52</span> Intvar
SET INSERT_ID<span style="color: #303030;">=</span><span style="color: #0000d0; font-weight: bold;">1</span><span style="color: grey;">/*!*/</span>;
<span style="background-color: #f0a0a0; color: #f00000;">#</span><span style="color: #0000d0; font-weight: bold;">130225</span> <span style="color: #0000d0; font-weight: bold;">15</span><span style="color: #303030;">:</span><span style="color: #0000d0; font-weight: bold;">33</span><span style="color: #303030;">:</span><span style="color: #0000d0; font-weight: bold;">56</span> server id <span style="color: #0000d0; font-weight: bold;">1</span> end_log_pos <span style="color: #0000d0; font-weight: bold;">499</span> CRC32 <span style="color: #005080; font-weight: bold;">0x37e25d0a</span> Query thread_id<span style="color: #303030;">=</span><span style="color: #0000d0; font-weight: bold;">1</span> exec_time<span style="color: #303030;">=</span><span style="color: #0000d0; font-weight: bold;">0</span> error_code<span style="color: #303030;">=</span><span style="color: #0000d0; font-weight: bold;">0</span>
use <span style="background-color: #f0a0a0; color: #f00000;">`</span>test<span style="background-color: #f0a0a0; color: #f00000;">`</span><span style="color: grey;">/*!*/</span>;
SET TIMESTAMP<span style="color: #303030;">=</span><span style="color: #0000d0; font-weight: bold;">1361806436</span><span style="color: grey;">/*!*/</span>;
insert into t1 values (<span style="color: green; font-weight: bold;">null</span>, <span style="background-color: #fff0f0;">'mysql 5.6'</span>)
<span style="color: grey;">/*!*/</span>;
<span style="background-color: #f0a0a0; color: #f00000;">#</span> at <span style="color: #0000d0; font-weight: bold;">499</span>
<span style="background-color: #f0a0a0; color: #f00000;">#</span><span style="color: #0000d0; font-weight: bold;">130225</span> <span style="color: #0000d0; font-weight: bold;">15</span><span style="color: #303030;">:</span><span style="color: #0000d0; font-weight: bold;">33</span><span style="color: #303030;">:</span><span style="color: #0000d0; font-weight: bold;">56</span> server id <span style="color: #0000d0; font-weight: bold;">1</span> end_log_pos <span style="color: #0000d0; font-weight: bold;">530</span> CRC32 <span style="color: #005080; font-weight: bold;">0xf56d77c4</span> Xid <span style="color: #303030;">=</span> <span style="color: #0000d0; font-weight: bold;">17</span>
COMMIT<span style="color: grey;">/*!*/</span>;
DELIMITER ;
<span style="background-color: #f0a0a0; color: #f00000;">#</span> End of log file
ROLLBACK <span style="color: grey;">/* added by mysqlbinlog */</span>;
<span style="color: grey;">/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/</span>;
</pre>
</td></tr>
</tbody></table>
</div>
The extra/new information that we see the above output such as
<br />
<div style="background: #ffffff; background: white; border-width: .1em .1em .1em .8em; border: solid gray; color: black; overflow: auto; padding: .2em .6em; width: auto;">
<pre style="line-height: 125%; margin: 0;">CRC32 <span style="color: #005080; font-weight: bold;">0x280a5e52</span> </pre>
<pre style="line-height: 125%; margin: 0;"></pre>
<pre style="line-height: 125%; margin: 0;"><span style="background-color: white; color: #002d7a; font-family: Monaco, MonacoRegular, 'Courier New', monospace; font-size: 12px; line-height: 15px;"> </span><span style="line-height: 125%;"> </span></pre>
</div>
On the slave host:<br />
b) <b>slave_sql_verify_checksum: </b>Its ENABLED by default. However, as per online docs (<a href="http://dev.mysql.com/doc/refman/5.6/en/replication-options-slave.html#option_mysqld_slave-sql-verify-checksum" target="_blank">here</a>), this option is disabled by default, so I take it as documentation bug. When this option is ENABLED, slave host would examine and verify checksums when reading the relay log.<br />
<pre>show global variables like 'slave_sql_verify_checksum';
+---------------------------+-------+
| Variable_name | Value |
+---------------------------+-------+
| slave_sql_verify_checksum | ON |
+---------------------------+-------+
1 row in set (0.00 sec)
</pre>
<div class="blogger-post-footer"><script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-8190616-1");
pageTracker._trackPageview();
} catch(err) {}</script></div>Aftab Khanhttp://www.blogger.com/profile/17201066985732943851noreply@blogger.com1tag:blogger.com,1999:blog-8545214922787541097.post-3045616256539655292012-07-23T07:07:00.002-07:002012-07-23T07:08:22.808-07:00Innodb purging stallsOne of my clients reported an incident where they are getting 'Table Full' error against Innodb table. However, there seem to be ample free Innodb space available. So, when I looked at host server, I found they are running old mysql 5.0 release on 32bit platform, Innodb monitor output show:<br />
<br />
<span style="background-color: #f6f6f6; color: #003d5b; font-family: Tahoma, Verdana, Helvetica, sans-serif; font-size: x-small; text-align: left;">History list length 2051529 </span><br />
<span style="background-color: #f6f6f6; color: #003d5b; font-family: Tahoma, Verdana, Helvetica, sans-serif; font-size: x-small; text-align: left;">..</span><br />
<span style="background-color: #f6f6f6; color: #003d5b; font-family: Tahoma, Verdana, Helvetica, sans-serif; font-size: x-small; text-align: left;">Main thread process no. 9701, id 1111792528, state: sleeping<br />
</span><br />
<br />
Oh Innodb purge thread isn't running, and there is no change in "history length".<br />
Note: Purge thread never progresses when the main thread is in a 'sleep' state.<br />
<br />
<span style="background-color: white; color: #003d5b; font-family: Tahoma, Verdana, Helvetica, sans-serif; font-size: x-small; text-align: left;">Related </span><span style="background-color: #f6f6f6; color: #003d5b; font-family: Tahoma, Verdana, Helvetica, sans-serif; font-size: x-small; text-align: left;">BUG 13847885. Quoting:</span><br />
<span style="background-color: #f6f6f6; color: #003d5b; font-family: Tahoma, Verdana, Helvetica, sans-serif; font-size: x-small; text-align: left;"> </span><span style="background-color: white; font-family: Helvetica, Arial, sans-serif; font-size: 14.399999618530273px; line-height: 25.600000381469727px;">Deleting a huge amount of data from </span><code class="literal" style="background-color: white; border: 0px; color: #026789; font-family: 'Courier New', Courier, fixed, monospace; font-size: 13.600000381469727px; font-weight: bold; line-height: 25.600000381469727px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">InnoDB </code><span style="background-color: white; font-family: Helvetica, Arial, sans-serif; font-size: 14.399999618530273px; line-height: 25.600000381469727px;">tables within a short time could cause the </span><a href="http://dev.mysql.com/doc/refman/5.5/en/glossary.html#glos_purge" style="background-color: white; border: 0px; color: #015a84; font-family: Helvetica, Arial, sans-serif; font-size: 14.399999618530273px; line-height: 25.600000381469727px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;" target="_top">purge</a><span style="background-color: white; font-family: Helvetica, Arial, sans-serif; font-size: 14.399999618530273px; line-height: 25.600000381469727px;"> operation that removes delete-marked records to stall. This issue could result in unnecessary disk space use, but does not cause any problems with data integrity. If this issue causes a disk space shortage, restart the server to work around it. This issue is only likely to occur on 32-bit platforms</span><br />
<span style="background-color: #f6f6f6; color: #003d5b; font-family: Tahoma, Verdana, Helvetica, sans-serif; font-size: x-small; text-align: left;">B</span><span style="background-color: white; color: #003d5b; font-family: Tahoma, Verdana, Helvetica, sans-serif; font-size: x-small; text-align: left;">ug fixed in 5.0.97, 5.1.63, 5.5.23</span><br />
<span style="background-color: white; color: #003d5b; font-family: Tahoma, Verdana, Helvetica, sans-serif; font-size: x-small; text-align: left;"><br /></span><br />
<span style="background-color: white; color: #003d5b; font-family: Tahoma, Verdana, Helvetica, sans-serif; font-size: x-small; text-align: left;">Solution: Restart MySQL and upgrade MySQL version</span><div class="blogger-post-footer"><script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-8190616-1");
pageTracker._trackPageview();
} catch(err) {}</script></div>Aftab Khanhttp://www.blogger.com/profile/17201066985732943851noreply@blogger.com0tag:blogger.com,1999:blog-8545214922787541097.post-53682608697237791042012-07-07T08:09:00.001-07:002012-07-10T09:38:55.836-07:00MySQL - working with xml data<br />
MySQL (5.1 and onward) provide XML functions; such as ExtractValue() that can be
helpful to read required elements from xml; instead of returning entire
xml back to the client application we can return one (or more) xml
elements containing required data.<br />
<div class="wysiwyg-macro" macrohasbody="true" macroname="noformat" macrostarttag="{noformat}" wikihasnewlineafterbody="true" wikihasnewlinebeforebody="true" wikihasprecedingnewline="true" wikihastrailingnewline="true">
<div class="preformatted panel" mce_style="border-width: 1px;" style="border-width: 1px;">
<div class="preformattedContent panelContent">
<pre>ExtractValue(xml_fragment, xpath_expression)
</pre>
</div>
</div>
</div>
<a class="external-link" href="http://dev.mysql.com/doc/refman/5.1/en/xml-functions.html" linktype="raw" mce_href="http://dev.mysql.com/doc/refman/5.1/en/xml-functions.html" originalalias="http://dev.mysql.com/doc/refman/5.1/en/xml-functions.html" rel="nofollow" wikidestination="http://dev.mysql.com/doc/refman/5.1/en/xml-functions.html">http://dev.mysql.com/doc/refman/5.1/en/xml-functions.html</a><br />
In the following example, we use <tt>ExtractValue()</tt> with column <tt>content</tt> as the first argument. For the second argument, we employ an <tt>XPath</tt> expression that means “the content of the <tt><variable></variable></tt> element having the name attribute "bankName"”:<br />
<pre style="background-image: URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimjAKQJ4zEiaHzkSKzylts2udkDGzzj8qAewvHJjPNeXG8ASPoiNU6-h7DZjsNLK_CXCv2neWS4CWApSfrgWjg2tcuV1f-ye7tfBVGijmtcqzl-0OoPGRaTafaMGfHxqsghRJh7VW4S8r-/s320/codebg.gif); background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"><code style="color: black; word-wrap: normal;">SELECT ExtractValue(content, '//variable[@name="bankName"][1]') "bankName" from xml_test where id=2;
+----------+
| bankName |
+----------+
| xyz |
+----------+
1 row in set (0.00 sec)
</code></pre>
<br />
We can read more than one attribute:<br />
<br />
<pre style="background-image: URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimjAKQJ4zEiaHzkSKzylts2udkDGzzj8qAewvHJjPNeXG8ASPoiNU6-h7DZjsNLK_CXCv2neWS4CWApSfrgWjg2tcuV1f-ye7tfBVGijmtcqzl-0OoPGRaTafaMGfHxqsghRJh7VW4S8r-/s320/codebg.gif); background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"><code style="color: black; word-wrap: normal;">SELECT ExtractValue(content, '//variable[@name="bankName"][1]') "bankName", ExtractValue(content, '//variable[@name="productType"][1]') "productType" from xml_test where id=1;
+----------+-------------+
| bankName | productType |
+----------+-------------+
| xyz | cvv=*** |
+----------+-------------+
1 row in set (0.00 sec)
</code></pre>
<div class="wysiwyg-macro" macrohasbody="true" macroname="noformat" macrostarttag="{noformat}" wikihasnewlineafterbody="true" wikihasnewlinebeforebody="true" wikihasprecedingnewline="true" wikihastrailingnewline="true">
<div class="preformatted panel" mce_style="border-width: 1px;" style="border-width: 1px;">
<div class="preformattedContent panelContent">
<pre><span style="background-color: white;">Similarly we can extract all attributes of a particular xml element </span></pre>
<pre style="background-image: URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimjAKQJ4zEiaHzkSKzylts2udkDGzzj8qAewvHJjPNeXG8ASPoiNU6-h7DZjsNLK_CXCv2neWS4CWApSfrgWjg2tcuV1f-ye7tfBVGijmtcqzl-0OoPGRaTafaMGfHxqsghRJh7VW4S8r-/s320/codebg.gif); background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"><code style="color: black; word-wrap: normal;"> SELECT ExtractValue(content,'//dictionary[@name="client_b"]/*') as "all attributes" from xml_test where id=2;
+----------------+
| all attributes |
+----------------+
| abc cvv=*** |
+----------------+
1 row in set (0.00 sec)
</code></pre>
</div>
</div>
</div><div class="blogger-post-footer"><script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-8190616-1");
pageTracker._trackPageview();
} catch(err) {}</script></div>Aftab Khanhttp://www.blogger.com/profile/17201066985732943851noreply@blogger.com1tag:blogger.com,1999:blog-8545214922787541097.post-82216473944153743392012-06-23T03:15:00.001-07:002012-06-24T03:08:30.187-07:00MySQL - capturing diagnostic data<div id="google_translate_element">
</div>
<script>
function googleTranslateElementInit() {
new google.translate.TranslateElement({
pageLanguage: 'en'
}, 'google_translate_element');
}
</script><script src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit">
</script>
<br />
<link href="http://alexgorbatchev.com/pub/sh/current/styles/shCore.css" rel="stylesheet" type="text/css"></link>
<link href="http://alexgorbatchev.com/pub/sh/current/styles/shThemeDefault.css" rel="stylesheet" type="text/css"></link>
<script src="http://alexgorbatchev.com/pub/sh/current/scripts/shCore.js" type="text/javascript">
</script>
<script src="http://alexgorbatchev.com/pub/sh/current/scripts/shBrushCpp.js" type="text/javascript">
</script>
<script src="http://alexgorbatchev.com/pub/sh/current/scripts/shBrushCSharp.js" type="text/javascript">
</script>
<script src="http://alexgorbatchev.com/pub/sh/current/scripts/shBrushCss.js" type="text/javascript">
</script>
<script src="http://alexgorbatchev.com/pub/sh/current/scripts/shBrushJava.js" type="text/javascript">
</script>
<script src="http://alexgorbatchev.com/pub/sh/current/scripts/shBrushJScript.js" type="text/javascript">
</script>
<script src="http://alexgorbatchev.com/pub/sh/current/scripts/shBrushPhp.js" type="text/javascript">
</script>
<script src="http://alexgorbatchev.com/pub/sh/current/scripts/shBrushPython.js" type="text/javascript">
</script>
<script src="http://alexgorbatchev.com/pub/sh/current/scripts/shBrushRuby.js" type="text/javascript">
</script>
<script src="http://alexgorbatchev.com/pub/sh/current/scripts/shBrushSql.js" type="text/javascript">
</script>
<script src="http://alexgorbatchev.com/pub/sh/current/scripts/shBrushVb.js" type="text/javascript">
</script>
<script src="http://alexgorbatchev.com/pub/sh/current/scripts/shBrushXml.js" type="text/javascript">
</script>
<script src="http://alexgorbatchev.com/pub/sh/current/scripts/shBrushPerl.js" type="text/javascript">
</script>
<script language="javascript">
SyntaxHighlighter.config.bloggerMode = true;
SyntaxHighlighter.config.clipboardSwf = 'http://alexgorbatchev.com/pub/sh/current/scripts/clipboard.swf';
SyntaxHighlighter.all();
</script>
Sporadic problems such as occasional server stalls can be difficult to diagnose. It is important to capture good diagnostic data when the problem is clearly happening. And it gets frustrating when you don't know when next it will hit your database. So, we need to find a way to know when problem happens,Let's call it 'diagnostic trigger'. We need to find good indicator e.g. sudden sever's load spike and/or spike in status varaibles such as Threads_connected, Threads_running.<br />
Thanks to <b>perconna Toolkit,</b> <a href="http://www.percona.com/doc/percona-toolkit/2.1/pt-stalk.html#cmdoption-pt-stalk--collect">pt-stalk -</a> Watches for a trigger condition to become true, and then collects data to help in diagnosing problems.
I performed few quick test using pt-stalk:<br />
<u>Installation:</u><br />
At the time of writing this article percona-toolki2.1.2 is the latest release: <br />
wget http://www.percona.com/downloads/percona-toolkit/2.1.2/percona-toolkit-2.1.2-1.noarch.rpm<br />
<br />
You might have to install following required by percona-toolkit: <br />
yum install perl-Time-HiRes.x86_64<br />
yum install perl-TermReadKey.x86_64<br />
<h3>
</h3>
<h3>
<u>Quick Examples:</u></h3>
<h4>
</h4>
<h4>
A) Collect diagnostic data when at least 40 threads are running,</h4>
<pre><span style="font-size: x-small;">
# pt-stalk --function status --variable Threads_running \
--threshold 40 --prefix=mysql_trouble --prefix=mysql_trouble --cycles=2-- \
-uroot -pxxxx
....
2012_06_23_10_13_11 Check results: Threads_running=1, matched=no, cycles_true=0
2012_06_23_10_13_12 Check results: Threads_running=1, matched=no, cycles_true=0
2012_06_23_10_13_14 Check results: Threads_running=1, matched=no, cycles_true=0
2012_06_23_10_13_15 Check results: Threads_running=40, matched=yes, cycles_true=1
2012_06_23_10_13_16 Check results: Threads_running=41, matched=yes, cycles_true=2
2012_06_23_10_13_16 Collect triggered
2012_06_23_10_13_16 Collector PID 16113
2012_06_23_10_13_16 Sleeping 300 seconds after collect
</span></pre>
And the stored diagnostic data is available in its default location:
<br />
<pre><span style="font-size: x-small;"># ls -lh /var/lib/pt-stalk/
total 572K
-rw-r--r-- 1 root root 4.5K Jun 23 11:08 mysql_trouble-df
-rw-r--r-- 1 root root 153 Jun 23 11:08 mysql_trouble-disk-space
-rw-r--r-- 1 root root 16K Jun 23 11:08 mysql_trouble-diskstats
...
-rw-r--r-- 1 root root 15K Jun 23 11:08 mysql_trouble-top
-rw-r--r-- 1 root root 386 Jun 23 11:08 mysql_trouble-trigger
-rw-r--r-- 1 root root 8.1K Jun 23 11:08 mysql_trouble-variables
-rw-r--r-- 1 root root 992 Jun 23 11:08 mysql_trouble-vmstat
-rw-r--r-- 1 root root 245 Jun 23 11:08 mysql_trouble-vmstat-overall
</span><span style="background-color: white; color: #333333; font-family: Arial; font-size: 12px; line-height: 20px; text-align: justify;">
</span></pre>
<h3>
<span style="background-color: white; color: #333333; font-family: Arial; font-size: 12px; line-height: 20px; text-align: justify;">B) Collect data when at least 20 queries running in the '<i>copying to tmp table</i>' State.</span></h3>
<pre><pre><span style="font-size: x-small;">pt-stalk --function processlist --variable State \
--match Copying --threshold 20 --prefix=mysql_trouble --cycles=2 \
-- -uroot -pxxxxx
..
2012_06_23_11_54_19 Check results: State=21, matched=yes, cycles_true=1
2012_06_23_11_54_20 Check results: State=21, matched=yes, cycles_true=2
2012_06_23_11_54_20 Collect triggered
2012_06_23_11_54_21 Collector PID 9154
2012_06_23_11_54_21 Sleeping 300 seconds after collect
</span></pre>
</pre>
<h4>
You will probably like to run this tool as daemon - Here’s a sample configuration file for triggering when there are more than 40 threads running at once: </h4>
<pre><pre class="brush:html"># Config for pt-stalk
variable=Threads_running
cycles=2 # trigger if problem seen twice in a row
dest=/var/log/mysql_diagnostics
threshold=40
daemonize
--
--user=monitoring
--password=xxxx
</pre>
Syntax to run pt-stalk as daemon:
<code># pt-stalk --config /etc/pt-stalk.cnf</code>
For more information about configuration files click <a href="http://www.percona.com/doc/percona-toolkit/2.1/configuration_files.html">here</a>
</pre><div class="blogger-post-footer"><script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-8190616-1");
pageTracker._trackPageview();
} catch(err) {}</script></div>Aftab Khanhttp://www.blogger.com/profile/17201066985732943851noreply@blogger.com0tag:blogger.com,1999:blog-8545214922787541097.post-53897677034260776752012-06-16T02:55:00.001-07:002012-08-08T07:48:00.871-07:00MySQL - How to scale inserts<div id="google_translate_element">
</div>
<script>
function googleTranslateElementInit() {
new google.translate.TranslateElement({
pageLanguage: 'en'
}, 'google_translate_element');
}
</script><script src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit">
</script>
Usually we expect inserts with large number of threads would to be faster <span style="color: black;">but this is not always ture. </span>The bottleneck might be the CPU, IO controller ... MySQL can not fully
use available cores/cpus e.g. MySQL 5.0 (Innodb) is limited to 4 cores etc. One of my clients had a problem scaling inserts, they have two data processing clusters each of which use 40 threads - so total 80 threads insert data into MySQL database (version 5.0.51). The issue, inserts are delayed by minute(s) and the backlog continue to grow... After examining innodb monitor status we found long list of transactions waiting for AUTO-INC lock: For example:<br />
<br />
<br />
<code>
------- TRX HAS BEEN WAITING 9 SEC FOR THIS LOCK TO BE GRANTED:
TABLE LOCK table `alertxxxx/alertdata` trx id 0 685590474 lock mode AUTO-INC waiting
------------------
---TRANSACTION 0 685590465, ACTIVE 10 sec, process no 8457, OS thread id 1169045824 setting auto-inc lock</code><br />
<br />
Why AUTO-INC lock? <span style="color: #026789;"><b>-</b></span> When accessing the auto-increment
counter, InnoDB uses a special table-level AUTO-INC lock that it keeps
to the end of the current SQL statement, not to the end of the
transaction. This basically cause all inserts into the same table to
serialize. With single row inserts it is normally not too bad but could
prevent scalability with multiple threads inserting <span style="color: black;">Bug #16979.</span> However, you can reach better through put (inserts per second) with
less threads. So after dropping number of threads on both clusters by 50% initially - taking it to 20-20 sessions. The problem almost disappeared and when we further reduced number of threads to 10-10 sessions, the problem disappeared!<br />
<br />
<span style="color: blue;"><span style="font-family: Helvetica, Arial, sans-serif; font-size: 14px; line-height: 25px;">Beginning with MySQL 5.1.22</span> - new locking model introduced for handling Innodb auto-increment in InnoDB. There is a good
article which talks about this </span><a href="http://dev.mysql.com/doc/refman/5.1/en/innodb-auto-increment-handling.html#innodb-auto-increment-configurable" target="_blank">here </a>and <a href="http://harrison-fisk.blogspot.co.uk/2009/02/my-favorite-new-feature-of-mysql-51.html" target="_blank">here </a><br />
<br />
Similarly, if you want to achieve fast insert performance, it can be
interesting to load files instead of the loading the inserts one by one :
it is 3 to 4 times faster. <span style="color: black;">If the goal is a huge amount of data already known at that time,</span> <span style="color: black;">it is probably the best option.</span><br />
<br />
<span style="color: black;">Optimization:</span><br />
<span style="color: black;"></span><br />
<br />
<span style="color: #026789;"><b>1. Optimize database structure -</b></span>
Design your tables to minimize their space on the disk. This can
result in huge improvements by reducing the amount of data
written to and read from disk. Smaller tables normally require
less main memory while their contents are being actively
processed during query execution. Any space reduction for table
data also results in smaller indexes that can be processed
faster. Ensure columns have the right data types and require least
amount of storage, you should try to use the most precise type in
all cases. For example, if an integer column is used for values
in the range from 1 to 99999, MEDIUMINT UNSIGNED is the best
type. For more information about optimizing database structure click <a class="external-link" href="http://dev.mysql.com/doc/refman/5.0/en/data-size.html" rel="nofollow">here</a>. If you store large strings (TEXT) or BLOB, compression may help there is an article about it <a class="external-link" href="http://mysqlopt.blogspot.co.uk/2012/05/data-compression-not-only-significantly.html" rel="nofollow">here</a><span style="color: #026789;"> </span><br />
<br />
<span style="color: #026789;"><b>2. Innodb flush method -</b></span> e.g.
O_DIRECT, if used can help to avoid double buffering between the InnoDB
buffer pool and the operating system's filesystem cache. MySQL reference
manual explain this <a class="external-link" href="http://dev.mysql.com/doc/refman/5.1/en/innodb-parameters.html#sysvar_innodb_flush_method" rel="nofollow">here</a>.<br />
[<img align="absmiddle" alt="" border="0" class="emoticon" height="16" src="http://confluence.adeptra.com/images/icons/emoticons/forbidden.gif" width="16" /> Warning] <span style="color: black;">O_DIRECT, serializes the writes in ext3. Howerver, impact can be lowered by using innodb_file_per_table)</span><br />
<br />
<span style="color: #026789;"><b>3. Innodb thread concurrency -</b></span>
Keep the value low for this option variable (default 8 ok), however the
correct value for this variable is dependent on environment and
workload. This option variable is explained <a class="external-link" href="http://dev.mysql.com/doc/refman/5.1/en/innodb-parameters.html#sysvar_innodb_thread_concurrency" rel="nofollow">here</a><br />
<br />
<span style="color: #026789;"><b>4. Innodb buffer pool -</b></span> Innodb
maintains a buffer pool for caching data and indexes in memory.
Making the pool larger can improve performance by reducing the
amount of disk I/O needed, here is the good article that
explains <a class="external-link" href="http://mysqlopt.blogspot.co.uk/2012/01/mysql-server-tuning.html" rel="nofollow">here</a> and <a class="external-link" href="http://dev.mysql.com/doc/refman/5.0/en/innodb-buffer-pool.html" rel="nofollow">here</a>.<br />
<br />
<span style="color: #026789;"><b>5. Innodb log file size-</b></span> The
larger the value, the less checkpoint flush activity is needed
in the buffer pool, saving disk I/O. But larger log files
also mean that recovery is slower in case of a crash. As of
MySQL 5.5, recovery times have been greatly improved and the whole log
file flushing algorithm has been improved. In 5.5 you generally want
larger log files as recovery is improved. Article about selecting innodb
log file size is <a class="external-link" href="http://mysqlopt.blogspot.co.uk/2012/01/how-to-check-if-innodb-log-files-are.html" rel="nofollow">here</a><br />
<br />
<b style="color: #026789;">6 Innodb_flush_log_at_trx_commit -</b>. The default value of 1 is the value required for ACID compliance. You can achieve better performance by setting the value different from 1, but then you can lose at most one second worth of transactions in a crash. With a value of 0, any mysqld process crash can erase the last second of transactions. With a value of 2, then only an operating system crash or a power outage can erase the last second of transactions. However, InnoDB's crash recovery is not affected and thus crash recovery does work regardless of the value.<br />
<br />
<span style="color: #026789;"><b>7. Filesystem selection and disk issues -</b></span>
'xfs' is known to perform very well with MySQL. Also writing the redo
logs, binary logs, data files in different physical disks is a good
practice with a bigger gain than server configuration. RAID 10 is
recommended for best performance, more detail about disk issue can be
found <a class="external-link" href="http://dev.mysql.com/doc/refman/5.0/en/disk-issues.html" rel="nofollow">here</a> and <a class="external-link" href="http://www.miracleas.com/BAARF/RAID5_versus_RAID10.txt" rel="nofollow">here</a><br />
<br />
<span style="color: black;">Continue... </span><div class="blogger-post-footer"><script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-8190616-1");
pageTracker._trackPageview();
} catch(err) {}</script></div>Aftab Khanhttp://www.blogger.com/profile/17201066985732943851noreply@blogger.com0tag:blogger.com,1999:blog-8545214922787541097.post-31913481269683121612012-05-30T08:45:00.000-07:002012-05-30T09:33:34.421-07:00Data compression<div id="google_translate_element">
</div>
<script>
function googleTranslateElementInit() {
new google.translate.TranslateElement({
pageLanguage: 'en'
}, 'google_translate_element');
}
</script><script src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit">
</script>
Data compression not only significantly reduces the storage required
for the database, but also improves throughput by reducing the I/O
workload, at a modest cost in processing overhead. The storage cost
savings can be important, but the reduction in I/O costs can be even
more valuable. There are three possible ways to achieve that<br />
<br />
1. Use compress/uncompress function in the database<br />
<a class="external-link" href="http://dev.mysql.com/doc/refman/5.1/en/encryption-functions.html#function_compress" rel="nofollow">http://dev.mysql.com/doc/refman/5.1/en/encryption-functions.html#function_compress</a><br />
<br />
2. Innodb-plugin offers table compression<br />
<a class="external-link" href="http://dev.mysql.com/doc/innodb-plugin/1.0/en/innodb-compression-background.html" rel="nofollow">http://dev.mysql.com/doc/innodb-plugin/1.0/en/innodb-compression-background.html</a><br />
<br />
3. Compress/uncompress data in client not in the database. This will
offload more stuff – CPU and network. . This approach uses CPU cycles
for compression and uncompression on the client machine
rather than the database server, which might be appropriate
for a distributed application with many clients, or where
the client machine has spare CPU cycles.<br />
<br />
We performed benchmarks (using table structre mentioned on my previous post: <a href="http://mysqlopt.blogspot.co.uk/2012/04/binary-log-synchronization.html" target="_blank">binary-log-synchronization</a>) to evaluate
the impact of using above mentioned data compression techniques (1 &
2 only), test data was loaded using 8 parallel database sessions into
original table, compressed table and as well as into original table but
using compress function to compress "content" column.<br />
<br />
<table border="2"><tbody>
<tr>
<th>Table <br />
Format </th>
<th>Time to <br />
load 80k records </th>
<th>Data file size </th>
</tr>
<tr>
<td>Original <br />
Table </td>
<td>0m57.515s </td>
<td>1.6GB </td>
</tr>
<tr>
<td><span style="color: red;">Compressed</span> <br />
<span style="color: red;">Table:</span> <br />
<span style="color: red;">ROW_FORMAT</span> <br />
<span style="color: red;">=COMPRESSED</span> </td>
<td><span style="color: red;">1m9.613s</span> </td>
<td><span style="color: red;">648MB</span> </td>
</tr>
<tr>
<td class="confluenceTd"><span style="color: green;"><b>Original</b></span><br />
<span style="color: green;"><b>Table</b></span> <br />
<span style="color: green;"><b>using compress()</b></span> <br />
<span style="color: green;"><b>function</b></span> </td>
<td class="confluenceTd"><span style="color: green;"><b>0m35.883s</b></span> </td>
<td class="confluenceTd"><span style="color: green;"><b> 156MB</b></span> </td>
</tr>
</tbody></table>
<br />
The results show that inserting data in compressed format (i.e. using
compress() function) is the fastest approach and it gives better
compression than using innodb compressed table. Using compress()
function we have the control to compress only selected columns whereas
innodb compressed table compress the entire table.<br />
<br />
We also perfomed benchmarks to read
data from original table, compressed table and original table but using
uncompress() function (to uncompress compressed data), total 800k
lookups were perfomed using id=<<random>></random><br />
<table border="2" class="confluenceTable"><tbody>
<tr>
<th class="confluenceTh">Table </th>
<th class="confluenceTh">Time to perform <br />
800k lookups </th>
</tr>
<tr>
<td class="confluenceTd"><span style="color: green;">Compressed</span><br />
<span style="color: green;">Table:</span><br />
<span style="color: green;">row_format=</span><br />
<span style="color: green;">compressed</span></td>
<td class="confluenceTd"><span style="color: green;">1m26.426s</span> </td>
</tr>
<tr>
<td class="confluenceTd"><span style="color: green;">Original</span> <br />
<span style="color: green;">Table</span><br />
<span style="color: green;">using uncompress()</span><br />
<span style="color: green;">function</span></td>
<td class="confluenceTd"><span style="color: green;">1m26.197s</span> </td>
</tr>
<tr>
<td class="confluenceTd"><span style="color: red;">Original table</span></td>
<td class="confluenceTd"><span style="color: red;">6m29.504s</span> </td>
</tr>
</tbody></table>
<br />
The test results show that lookups performed againts compressed
tables are at least 6 times faster than original table. The reason for
which is that compressed table is much smaller than original table thus
most of the data can fit into memory and hence reducing disk I/Os.<div class="blogger-post-footer"><script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-8190616-1");
pageTracker._trackPageview();
} catch(err) {}</script></div>Aftab Khanhttp://www.blogger.com/profile/17201066985732943851noreply@blogger.com1tag:blogger.com,1999:blog-8545214922787541097.post-8966558981477776342012-04-18T02:04:00.000-07:002015-08-13T07:44:42.080-07:00Binary log Synchronization<div id="google_translate_element">
</div>
<script>
function googleTranslateElementInit() {
new google.translate.TranslateElement({
pageLanguage: 'en'
}, 'google_translate_element');
}
</script><script src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit">
</script>
MySQL <a class="external-link" href="http://dev.mysql.com/doc/refman/5.5/en/replication-options-binary-log.html#sysvar_sync_binlog" rel="nofollow">sync_binlog</a>
option variable is used to control how often binary log may be
synchronized to disk. By default, it is not synchronized to disk at each
write. So if the operating system or machine (not only the MySQL
server) crashes, there is a chance that the last statements of the
binary log are lost. To prevent this, you can make the binary log
be synchronized to disk after every N writes to the binary log,
with the <a class="external-link" href="http://dev.mysql.com/doc/refman/5.5/en/replication-options-binary-log.html#sysvar_sync_binlog" rel="nofollow">sync_binlog</a> system variable. With value of 1 - every single statement is written
to disk, it means that the performance suffers, usually a lot unless
the disk has a battery-backed cache enabled, which makes
synchronization fast. <br />
<br />
I performed some load tests to see how it may hurt database performance when the battery-backed disk cache is missing:<br />
<br />
Total 40,000 records inserted into table using 4 parallel db connections:<br />
<br />
<table class="confluenceTable"><tbody>
<tr><th class="confluenceTh"><table class="confluenceTable"><tbody>
<tr><th class="confluenceTh">sync_binlog </th>
<th class="confluenceTh">time </th>
</tr>
<tr>
<td class="confluenceTd">0 </td>
<td class="confluenceTd">0m17.972s </td>
</tr>
<tr>
<td class="confluenceTd"><span style="color: red;"><b>1</b></span></td>
<td class="confluenceTd"><span style="color: red;"><b>1m4.599s</b></span> </td>
</tr>
<tr>
<td class="confluenceTd">2 </td>
<td class="confluenceTd">0m44.364s </td>
</tr>
<tr>
<td class="confluenceTd">3 </td>
<td class="confluenceTd">0m34.197s </td>
</tr>
<tr>
<td class="confluenceTd">4 </td>
<td class="confluenceTd">0m18.693s </td></tr>
</tbody></table>
</th>
<th class="confluenceTh"><br /></th>
</tr>
</tbody></table>
<br />
sync_binlog with value of 3 simply means: only fsync binlog every third transaction.<br />
The higher you increase the value of sync_binlog, the closer the results will be to sync_binlog=0 (no fsyncing).<br />
<br />
Value of 1 is safest of course, but as you see, without decent battery backed write caching controller, performance is very bad.<br />
<br />
<b>Test case :</b><br />
<br />
Tools used:<br />
<br />
-- MySQL 5.1.56<br />
-- mysqlslap<br />
-- platform -<br />
Red Hat 4.1.2-50 x86_64<br />
, RAID 5 (8 disks, 67.75 GB each, Vendor DELL)<br />
, Intel(R) Xeon(R) CPU 5148 @ 2.33GHz, 4 CPUs<br />
, 8G RAM<br />
<br />
<br />
<br />
# Connect to MySQL client and perform:<br />
<br />
drop database if exists test_case_9;<br />
create database test_case_9;<br />
use test_case_9;<br />
CREATE TABLE t (<br />
`id` bigint(20) NOT NULL AUTO_INCREMENT,<br />
`content` blob,<br />
PRIMARY KEY (`id`)<br />
) ENGINE=InnoDB AUTO_INCREMENT=800001 DEFAULT CHARSET=utf8;<br />
<br />
<br />
drop function if exists insert_data;<br />
delimiter //<br />
CREATE DEFINER=`root`@`localhost` FUNCTION `insert_data`() RETURNS int(11)<br />
DETERMINISTIC<br />
BEGIN<br />
INSERT
INTO t(id,content) values (null,REPEAT('bla bla',5000));<br />
RETURN ROW_COUNT();<br />
END<br />
//<br />
delimiter ;<br />
<br />
<b>-- Change sync_binlog to value 0</b><br />
mysql> set global sync_binlog=0;<br />
<br />
mysql> quit<br />
<br />
# Run following steps from a shell prompt<br />
<br />
<b>-- load data using mysqlslap tool</b><br />
$ time mysqlslap --user=root --query="select test_case_9.insert_data();" --concurrency=4 --iterations=10000;<br />
Benchmark<br />
Average number of seconds to run all queries: 0.001 seconds<br />
Minimum number of seconds to run all queries: 0.001 seconds<br />
Maximum number of seconds to run all queries: 0.229 seconds<br />
Number of clients running queries: 4<br />
Average number of queries per client: 1<br />
<br />
<br />
real 0m17.972s<br />
user 0m1.306s<br />
sys 0m3.096s <br />
<br />
<b>A) -- Change sync_binlog to value 1 and empty test table 't'</b><br />
<br />
<br />
$ mysql -uroot -S /mnt/database/mysql_5.1/mysql.sock test_case_9 -e"truncate table t; set global sync_binlog=1;"<br />
<br />
<b>B) -- load data using mysqlslap tool</b><br />
<br />
$ time mysqlslap --user=root --query="select test_case_9.insert_data();" --concurrency=4 --iterations=10000;<br />
Benchmark<br />
Average number of seconds to run all queries: 0.006 seconds<br />
Minimum number of seconds to run all queries: 0.003 seconds<br />
Maximum number of seconds to run all queries: 0.018 seconds<br />
Number of clients running queries: 4<br />
Average number of queries per client: 1<br />
<br />
<br />
real 1m4.239s<br />
user 0m1.672s<br />
sys 0m4.203s<br />
<br />
Repeat steps A and B to run load tests using Value 2, 3, and 4 with synch_binlog<div class="blogger-post-footer"><script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-8190616-1");
pageTracker._trackPageview();
} catch(err) {}</script></div>Aftab Khanhttp://www.blogger.com/profile/17201066985732943851noreply@blogger.com0tag:blogger.com,1999:blog-8545214922787541097.post-76759389002322734342012-03-06T12:22:00.002-08:002012-03-09T08:03:31.088-08:00MySQL - Event Scheduler<div class="wiki-content"><div class="wiki-content">MySQL Events are tasks that run according to a schedule. Therefore, we sometimes refer to them as <i>scheduled</i> events. Basically an event is a named database object containing one or more SQL statements to be executed at one or more regular intervals, beginning and ending at a specific date and time. Conceptually, this is similar to the idea of the Unix crontab (also known as a “cron job”) or the Windows Task Scheduler.<br />
<b>Here is the summary of Event object features:</b><br />
- An event is uniquely identified by its name and the schema to which it is assigned<br />
- An event performs a specific action according to a schedule. This action consists of an SQL statement, which can be a compound statement in BEGIN .. END;<br />
- An event's timing can be either <i>one-time</i> or <i>recurrent</i>. A one-time event executes one time only. A recurrent event repeats its action at a regular interval.<br />
For further details, visit :<a class="external-link" href="http://dev.mysql.com/doc/refman/5.1/en/events-overview.html" rel="nofollow">http://dev.mysql.com/doc/refman/5.1/en/events-overview.html</a><br />
Let's create an Event object to increment 'counter' column of event_test table every minute:<br />
<pre>mysql> CREATE EVENT my_event
ON SCHEDULE EVERY 1 MINUTE
DO UPDATE event_test set counter=counter+1;
Query OK, 0 rows affected (0.00 sec)
</pre>Metadata about events can be obtained as follows:<br />
<pre>mysql> SHOW CREATE EVENT my_event\G
*************************** 1. row ***************************
Event: my_event
sql_mode:
time_zone: SYSTEM
Create Event: CREATE EVENT `my_event`
ON SCHEDULE EVERY 1 MINUTE STARTS '2012-03-06 16:46:01'
ON COMPLETION NOT PRESERVE ENABLE
DO update event_test set counter=counter+1
character_set_client: latin1
collation_connection: latin1_swedish_ci
Database Collation: latin1_swedish_ci
1 row in set (0.00 sec)
</pre><br />
<blockquote class="tr_bq">Since this is a repeating event and may not terminate within its scheduling interval, the result may be multiple instances of the event executing simultaneously. Which is undesirable, use GET_LOCK() function or LOCK TABLE to avoid this.</blockquote>Check if the 'my_event' has actually worked<br />
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent"><pre>mysql> SELECT SLEEP(60); SELECT * FROM event_test;
+-----------+
| SLEEP(60) |
+-----------+
| 0 |
+-----------+
1 row in set (1 min 0.01 sec)
+---------+
| counter |
+---------+
| 0 |
+---------+
1 row in set (0.00 sec)
</pre></div></div>No it has not worked, because <i>event scheduler thread</i> is not ON. The global event_scheduler system variable determines whether the Event Scheduler is enabled and running on the server.<br />
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent"><pre>mysql> select @@GLOBAL.event_scheduler ;
+--------------------------+
| @@GLOBAL.event_scheduler |
+--------------------------+
| OFF |
+--------------------------+
1 row in set (0.00 sec)
</pre></div></div>To enable Event Scheduler use this sql:<br />
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent"><pre>mysql> set GLOBAL event_scheduler =ON;
Query OK, 0 rows affected (0.00 sec)
</pre></div></div>For more information about event scheduler, see <a class="external-link" href="http://dev.mysql.com/doc/refman/5.1/en/events-configuration.html" rel="nofollow">http://dev.mysql.com/doc/refman/5.1/en/events-configuration.html</a><br />
When the Event Scheduler is ON, the event scheduler thread is listed in the output of SHOW PROCESSLIST as a daemon process, and its state is represented as shown here:<br />
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent"><pre>mysql> SHOW PROCESSLIST;
| 43 | event_scheduler | localhost | NULL | Daemon | 35 |
Waiting for next activation | NULL |
+----+-----------------+-----------+------+---------+------+
</pre></div></div>Lets check the status of 'counter' after truning event Scheduler ON<br />
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent"><pre>mysql> SELECT SLEEP(60); SELECT * FROM event_test;
+-----------+
| SLEEP(60) |
+-----------+
| 0 |
+-----------+
1 row in set (1 min 0.00 sec)
+---------+
| counter |
+---------+
| 1 |
+---------+
1 row in set (0.00 sec)
mysql> SELECT SLEEP(60); SELECT * FROM event_test;
+-----------+
| SLEEP(60) |
+-----------+
| 0 |
+-----------+
1 row in set (1 min 0.01 sec)
+---------+
| counter |
+---------+
| 2 |
+---------+
1 row in set (0.00 sec)
</pre></div></div>To disable my_event, use this ALTER EVENT statement: <br />
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent"><pre>ALTER EVENT my_event
DISABLE;</pre><pre> </pre><pre>It was just a simple example to show,</pre><pre>that how to automate database task inside MySQL server.</pre></div></div></div></div><div class="blogger-post-footer"><script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-8190616-1");
pageTracker._trackPageview();
} catch(err) {}</script></div>Aftab Khanhttp://www.blogger.com/profile/17201066985732943851noreply@blogger.com4tag:blogger.com,1999:blog-8545214922787541097.post-30481853903024919792012-01-25T07:28:00.000-08:002012-07-24T04:35:08.592-07:00How to check if Innodb log files are big enoughInnoDB uses log files to store changes that must be applied to the database after service interruption (e.g power outage, crash). Thus, It is important for good performance that the Innodb log files are big enough.<br />
<br />
In this example, I would demonstrate how to check the amount of InnoDB log file space in use, follow these steps ( checking current usage at peak times):<br />
Examine INNODB MONITOR output (i.e. SHOW ENGINE INNODB STATUS\G) and look at these lines (if you are using 5.0 or 5.1 without Innodb plugin):<br />
<pre>---
LOG
---
Log sequence number 2380 1505869110
Log flushed up to 2380 1505868967
Last checkpoint at 2380 936944426
1 pending log writes, 0 pending chkp writes
532415047 log i/o's done, 544.17 log i/o's/second
</pre>
<br />
<span style="background-color: white;">Perfrom following calulation (formula) to know log space used. The values to use in calculation are "Log sequence number" and "Last checkpoint at".</span><br />
<br />
<pre>select (( ( 2380 * 4 * 1024 * 1024 * 1024) + 1505869110 ) - ( ( 2380 * 4 * 1024 * 1024 * 1024) + 936944426 )) /1024/1024 "Space used in MB";
+------------------+
| Space used in MB |
+------------------+
| 542.56885910 |
+------------------+
1 row in set (0.00 sec)
</pre>
<br />
In this example 542 megabytes is more than 75% of the total log space, so the logsize (512MB) is small. <span style="background-color: white;">Ensure that the amount of log space used never exceeds 75% of that value (542MB). Find the instructions <a href="http://www.mysqlperformanceblog.com/2011/07/09/how-to-change-innodb_log_file_size-safely/" target="_blank">here</a> to add/resizeInnodb log files.</span><br />
<span style="background-color: white;"><br /></span><br />
<span style="background-color: white;"><u><b>There is slightly different method to calculate innodb log file space used (if you are using MySQL 5.5 or InnoDB plugin in MySQL 5.1):</b></u>
Examine INNODB MONITOR output (i.e. SHOW ENGINE INNODB STATUS\G) and look at these lines:
</span><br />
<pre><span style="background-color: white;">---
LOG
---
Log sequence number 2388016708
Log flushed up to 2388016690
Last checkpoint at 2380597012
</span></pre>
<span style="background-color: white;">
<span style="background-color: white;">
<span style="background-color: white;">
Perfrom following calulation (formula) to know log space used. The values to use in calculation are "Log sequence number" and "Last checkpoint at".
</span><br />
</span></span><br />
<pre></pre>
<span style="background-color: white;"><span style="background-color: white;">
<span style="background-color: white;">
</span><br />
<pre><span style="background-color: white;">SELECT (2388016708 - 2380597012)/1024/1024 "Space used in MB";
+------------------+
| Space used in MB |
+------------------+
| 7.0759735111 |
+------------------+
1 row in set (0.00 sec)
</span></pre>
<span style="background-color: white;">
<div>
<span style="background-color: white;"><br /></span></div>
In this example 7MB is not more than 75% of the total log space.
As of MySQL 5.5, recovery times have been greatly improved and the whole log file flushing algorithm has been improved. In 5.5 you generally want larger log files as recovery is improved. Thus, the large innodb log files allow you to take advantage of the new algorithm.
</span></span></span><div class="blogger-post-footer"><script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-8190616-1");
pageTracker._trackPageview();
} catch(err) {}</script></div>Aftab Khanhttp://www.blogger.com/profile/17201066985732943851noreply@blogger.com2tag:blogger.com,1999:blog-8545214922787541097.post-55519985969924213752012-01-23T05:56:00.000-08:002013-05-28T02:07:32.107-07:00MySQL Server TuningMySQL server tuning is important; if you mainly use Innodb tables then you need to check how well your Innodb buffer pool is sized. <code class="literal">InnoDB</code> use it to cache data and indexes. The larger you set this value, the less disk I/O is needed to access data in tables. click <a href="http://dev.mysql.com/doc/refman/5.0/en/innodb-parameters.html#sysvar_innodb_buffer_pool_size" target="_blank">here </a>for more detail about innodb buffer pool<br />
<br />
<span style="background-color: white;">You can examine Innnodb buffer pool efficiency by looking at STATUS variables:</span><br />
<br />
<code>
mysql> SHOW GLOBAL STATUS LIKE 'innodb_buffer_pool_rea%';
Innodb_buffer_pool_read_requests | 4519597979 | </code><br />
<code>Innodb_buffer_pool_reads | 55253 | </code><br />
<br />
<code> </code><i>Innodb_buffer_pool_read_requests</i> are number of request to read a row from the buffer pool and <i>Innodb_buffer_pool_reads</i> is the number of times Innodb has to perform read data from disk to fetch required data pages.<br />
<br />
So <b><i>innodb_buffer_pool_reads/innodb_buffer_pool_read_requests*100= 0.001</i></b> is the efficiency. Thus, we see the vast majority of times INNODB is able to statisfy requests from memory, it's pretty normal for databases to have hot spots in which you're accessing only a portion of the data the majority of the time. <br />
<br />
Let's look at this example,<br />
<br />
<code>
mysql> SHOW GLOBAL STATUS LIKE 'innodb_buffer_pool_rea%';
Innodb_buffer_pool_read_requests | 2905072850 | </code><br />
<code>Innodb_buffer_pool_reads | 1073291394 |</code><br />
<br />
Calculate Innodb buffer pool efficiency:<br />
(107329139/ 2905072850*100) = 37 <br />
<br />
Here the Innodb is doing more disk reads, Innodb buffer pool is not big enough!<br />
<br />
Another way to examine innodb efficiency is to examine SHOW ENGINE INNODB STATUS output:<br />
<br />
<code>
----------------------<br />
BUFFER POOL AND MEMORY<br />
----------------------<br />
Total memory allocated 1838823262; in additional pool allocated 10550784<br />
Buffer pool size 102400<br />
<span style="color: red;">Free buffers 0 </span></code><br />
<code>Database pages 101424<br />
Modified db pages 24189<br />
Pending reads 0<br />
Pending writes: LRU 0, flush list 0, single page 0<br />
Pages read 2050214912, created 313658031, written 755828632<br />
36.95 reads/s, 12.12 creates/s, 7.05 writes/s<br />
<br />
<span style="color: red;">Buffer pool hit rate 993 / 1000
</span><br />
</code><br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<li>If there are numerous Innodb free buffers, you may need to reduce Innodb buffer pool. </li>
<li>Innodb hit ratio: 1000/1000 identifies a 100% hit rate </li>
<li>Slightly lower hit rate values may acceptable.</li>
<li>If you find Innodb hit ratio is less than 95% then you may need to increase Innodb buffer pool size.</li>
<br />
<ul></ul>
Note: On a dedicated database server, you may set <i>innodb_buffer_pool_size</i> up to 80% of the machine physical memory size. However, do not set it too large because competition for physical memory might cause paging in the operating system.<br />
<br />
Database size is usually much bigger than available RAM, so most of the time it's no feasible to have buffer pool size equals to database size. Luckily, innodb creates hot spots inside buffer pool, that is, most frequently accessed data pages stay in memory but if your application performs a lot of random <span style="font-family: Calibri, sans-serif; font-size: 11pt;">disk I/Os</span> and your database is too large to fit in memory and only small percentage of data pages can be cached in innodb buffer pool, then adding more RAM is the best solution for random-read I/O problem.<br />
<br />
If you still get poor Buffer pool hit rate, enable slow query log to capture bad queries that perform table scans and hence <span style="background-color: white;">blow out buffer pool cache.</span><br />
<br /><div class="blogger-post-footer"><script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-8190616-1");
pageTracker._trackPageview();
} catch(err) {}</script></div>Aftab Khanhttp://www.blogger.com/profile/17201066985732943851noreply@blogger.com7tag:blogger.com,1999:blog-8545214922787541097.post-44770029439874863352011-08-09T09:22:00.000-07:002011-08-09T09:22:43.089-07:00INNODB LOCKING REGRESSION FOR INSERT IGNORE<br />
<br />
Our application attempts to INSERT IGNORE the same row of data from many different connections to the same InnoDB table. In our test runs, we noticed that the 5.0 code created S locks while the 5.1 code created X locks for the same set of actions. <br />
<br />
In the code paths for 5.0 and below, INSERT IGNORE processing would take <br />
S-locks on any duplicate rows. The X-lock was reserved for only new rows <br />
added to the table. <br />
<br />
In 5.1 the locking logic was rewritten and all rows touched by INSERT IGNORE <br />
are X-locked instead. This can turn a parallel data merge process into <br />
essentially a single-threaded process because the connections that are not <br />
actually adding a row to the table must wait for their X-lock which requires <br />
the termination of the other locking thread(s). <br />
<br />
the fault can be traced to this logic (5.1+): <br />
<br />
if (allow_duplicates) { <br />
<br />
/* If the SQL-query will update or replace <br />
duplicate key we will take X-lock for <br />
duplicates ( REPLACE, LOAD DATAFILE REPLACE, <br />
INSERT ON DUPLICATE KEY UPDATE). */ <br />
<br />
err = row_ins_set_exclusive_rec_lock( <br />
LOCK_ORDINARY, rec, index, offsets, thr); <br />
<br />
This means that all INSERT IGNORE will take an X-lock because earlier this <br />
flag was set: <br />
<br />
case HA_EXTRA_IGNORE_DUP_KEY: <br />
thd_to_trx(ha_thd())->duplicates |= TRX_DUP_IGNORE; <br />
break;<br />
<br />
This defect has been reported to MySQL. <div class="blogger-post-footer"><script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-8190616-1");
pageTracker._trackPageview();
} catch(err) {}</script></div>Aftab Khanhttp://www.blogger.com/profile/17201066985732943851noreply@blogger.com0