) Innodb (off) Single thread, insert 120000 60000 60000 4 threads, inserting 40000*4 20000*4 40000*4 Single thread, batch 100/time insert 3600*100 800*100 3000*100 Single thread, batch 200/time insert 1800*200 400*200 1600*200 You can see that bulk insert performance is much higher than a single insert, but the size of one batch has little effect on performance. The parameters of whether each record refreshes the log have a significant impact on InnoDB performance. Overall, MyISAM performance is
The script for bulk import data SQL file, the data directory holds the SQL file to import, List.txt hold the list information to import.The script reads as follows:#!/usr/bin/envpython#-*-coding:utf-8-*-importos,sys,logging, datetime# log file Configuration Ifnotos.path.isdir (' logs '): os.mkdir (' logs ') Logging.basicconfig (level=logging.info, format= '% (asctime) s% (name) -12s% (levelname)- 8s% (message) s ', datefmt= '%y-%m-%d%h:%m ', filename=
of enabled to 1Cp-rp/etc/yum.repos.d/remi.repo/etc/yum.repos.d/remi.repo.bakSed-i ' 9s/enabled=0/enabled=1/'/etc/yum.repos.d/remi.repoSed-i ' 18s/enabled=0/enabled=1/'/etc/yum.repos.d/remi.repoSed-i ' 7s/^#//'/etc/yum.repos.d/remi.repoSed-i ' 8s/^/#/'/etc/yum.repos.d/remi.repoSed-i ' 15s/^#//'/etc/yum.repos.d/remi.repoSed-i ' 16s/^/#/'/etc/yum.repos.d/remi.repo#修改下面epel. Repo profile Information Otherwise it will be an error.Cp-rp/etc/yum.repos.d/epel.repo/etc/yum.repos.d/epel.repo.bakSed-i ' 3
transactions: 78s Peak Memory: 246KB
Total elapsed time for indexed transaction insertion: 82s Peak Memory: 246KB
No index load data insert total time: 12s Peak Memory: 246KB
Indexed load Data Insert Total time: 11s Peak Memory: 246KB
Myiasm engineMyISAM is the MySQL default storage engine. Simple design, support full-text search.Test environmentMacbook Air 12mid apache2.2.26 php5.5.10 mysql5.6.16Total 100W DataDatabase size 19.1MB (
find each key-value pair in the dictionaryFive. Dictionary method: items (): A list of tuples that generate all key-value pairsKeys (): Generate a list of all keysVALUES (): Generate a list of all valuesCopy (): A shallow copy of the dictionary (referential relationship)Six. An exampleTake "Gettysburg speech" as an example to analyze, judge the number of words and corresponding frequency, and to sort the displayimportstringdefaddword (word,wdict): #将word单词加入字典统计, No key-value pairs are added, t
the right based on "Ceaser.
In the figure, the horizontal axis is time, and the vertical axis is "change quantity ". What we can see is a very fast "explosion" phase, and then "explosion" will last for a long time.
The CSS bezercurve timing function is similar to the following:
svg#heavy path { fill: white; stroke: white; transition: 12s 1.6s cubic-bezier(0, 1, 0, 1); }Production Pressure Effect
Of course, this effect can also be made using JAVASCRIP
Function
Return type
Description
Example
To_char(Timestamp,Text)
Text
Converts a timestamp to a string.
To_char (current_timestamp, 'hh12: MI: ss ')
To_char(Interval,Text)
Text
Convert the time interval into a string
To_char (interval '15h 2 m 12s', 'hh24: MI: ss ')
To_char(Int,Text)
Text
Converts an integer to a string.
To_char (125, '123 ')
To_char(Double Precision,Text)
"Trybigger!"elseecho"Good!Youareright!"break;fidone
Guess digital game ultimate v2
Added the illegal input judgment function.
Added the random number function.
#!/bin/bashNUM=`echo$RANDOM$RANDOM|cut-c2-3`whiletruedoread-p"Pleaseinputa"double-digit":"inputcase$inputin[0-9][0-9])if[$input-gt$NUM];thenecho"Trysmaller!"elif[$input-lt$NUM];thenecho"Trybigger!"elseecho"Good!Youareright!"break;fi;;*)read-p"Pleaseinputa"double-digit":"input;;esacdone
Guess digital game ultimate v3
The Count sta
segmentStep 1: modify the content of Table 0 in the interrupt vector table to point to the entry address of our own interrupt handler.Start:MoV ax, 0MoV ds, axMoV word ptr ds: [0], 0200 HMoV word ptr ds: [2], 0Step 3: copy the prepared interrupt handler 0 to the memory address pointed to by Table 0 in the interrupt vector table; :0200MoV ax, CSMoV ds, axMoV Si, offset int0; DS: Si available copy Source AddressMoV ax, 0MoV es, axMoV Di, 200 h; destination address set ES: DiMoV CX, offset int0end
The virtual machine network settings that are imported from the virtual machine OVF template change and the NIC changes, so the network is not available after the virtual machine starts.So to do the following few things, the network will be available:1 First look at the/etc/udev/rules.d/70-persistent-net.rules file, the ETH NIC that appears at the end of the file is the new network card established by the system, and the MAC address. Comment out the original NIC line.2 views/etc/sysconfig/networ
, because Redis does not use timers or rotation traversal methods to detect client timeouts, but rather to do so in an asymptotic manner.Part of each check. So the result is that maybe you set the timeout to be 10s, but the actual execution time is 12s after the client is shut down.CLIENT CommandIn fact, it is the command associated with the client connection. The Redis CLIENT command enables three functions: check the status of the connection, kill a
/ndeploy_watcher.service to /usr/lib/systemd/system/ndeploy_watcher.service.Created symlink from /etc/systemd/system/multi-user.target.wants/ndeploy_backends.service to /usr/lib/systemd/system/ndeploy_backends.service.ConfGen:: saheethaConfGen:: satestYou can see that this script modifies the Apache port from 80 to another port to make Nginx a front-end Web server, and creates a virtual host configuration file for the existing cPanel users. Confirm the status of Apache and Nginx.Apache status:ro
string
To_char (interval '15h 2 m 12s', 'hh24: MI: ss ')
To_char (int, text)
Text
Converts an integer to a string.
To_char (125, '123 ')
To_char (double precision, text)
Text
Convert real numbers/double-precision numbers into strings
To_char (125.8: real, '999d9 ')
To_char (numeric, text)
Text
Converts numeric to a string.
To_char (-125.8, '999d99s ')
To_date (tex
9.8. Data Type Formatting Function
PostgreSQLThe Formatting Function provides a set of effective tools for various data types (date/time, integer, floating point, numeric) convert to a formatted string and, in turn, convert from a formatted string to a specified data type. Table 9-20 lists these functions. These functions follow a common call habit: the first parameter is the value to be formatted, and the second is a template that defines the output or output format.
To_timestampThe funct
state. To see a list of all current connections to the machine and their states, try:Netstat-tan | grep ': 80 ' | awk ' {print $6} ' | Sort | Uniq-cYou'll be presented with a list similar to the following:4 CLOSINGEstablished4 fin_wait1Fin_wait2Last_ack1 LISTENTen SYN_RECV273 Time_waitThis information can is very useful to determine whether for need to tweak some of the timeouts above.SYN Flood ProtectionThese settings added to sysctl.conf would make a server more resistant to SYN flood attacks
is several circumstances in which a connection cannot is established. One obvious case was when the server host was down.If, however, we place an ARP entry for a nonexistent host with the ARP table first, the ARP request is not sent,The system immediately attempts to the nonexistent host with TCP/IP.The interesting point in this output are how frequently the client's TCP sends a SYN to try to establish the Conne Ction.The second segment is sent 3s after the first, the third are sent 6s after th
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.