nvidia中的管理3d设置中的三重缓冲有什么作用

nvidia中的管理3d设置中的三重缓冲有什么作用,第1张

三重缓冲是一种图象处理技术,可以使显卡无需等待前缓冲区清空进而腾出后缓冲区,随时可以把渲染结果放入第3个缓冲区,从而提高游戏流畅度。

相关介绍:

三重缓冲使用一个前置缓存和两个后置缓存。在着色完第一个后置缓冲区的数据后,立即开始处理第二个后置缓冲区。

三级缓冲是低帧速的完美解决办法,不过,这并不是免费的午餐。打开三级缓冲也意味着需要多50%的缓存空间。在某些条件之下,它也可能会对游戏效果产生负面影响。

扩展资料

ATi和nVidia的驱动中都有打开三重缓冲(triple buffering)的选项。可惜这只能起到一半的作用,因为驱动中的3重缓冲选项只对OpenGL游戏起作用。加上OpenGL游戏远少于D3D游戏,所以事实上驱动的3倍缓冲选项在超过一半情况都不起作用。

如果发现游戏过程中存取硬盘过于频繁,则可能说明3级缓冲占用了太多显存,此时你就应该考虑降低游戏的画面设置或者购买更高档的显存容量更大的显卡了。

1、 MySQL Community Server 5610

官方网站下载mysql-5610-winx64zip

2、解压到d:\MySQL(路径自己指定)

3、在d:\MySQL下新建myini配置文件,内容如下:

配置文件开始

# MySQL Server Instance Configuration File

#----------------------------------------------------------------------

# Generated by the MySQL Server Instance ConfigurationWizard

#

#

# Installation Instructions

#----------------------------------------------------------------------

#

#

# CLIENT SECTION

#----------------------------------------------------------------------

#

# The following options will be read by MySQL clientapplications

# Note that only client applications shipped by MySQLare guaranteed

# to read this section If you want your own MySQLclient program to

# honor these values, you need to specify it as anoption during the

# MySQL client library initialization

#

[client]

port=3306

[mysql]

default-character-set=gbk

# SERVER SECTION

#----------------------------------------------------------------------

#

# The following options will be read by the MySQL ServerMake sure that

# you have installed the server correctly (see above)so it reads this

# file

#

[mysqld]

# The TCP/IP Port the MySQL Server will listen on

port=3306

#Path to installation directory All paths are usuallyresolved relative to this

basedir="d:\MySQL\"

#Path to the database root

datadir="d:\MySQL\Data"

[WinMySQLadmin]

Server="d:\MySQL\bin\mysqldexe"

# The default character set that will be used when anew schema or table is

# created and no character set is defined

default-character-set=gbk

# The default storage engine that will be used whencreate new tables when

default-storage-engine=INNODB

# Set the SQL mode to strict

sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"

# The maximum amount of concurrent sessions the MySQLserver will

# allow One of these connections will be reserved fora user with

# SUPER privileges to allow the administrator to logineven if the

# connection limit has been reached

max_connections=100

# Query cache is used to cache SELECT results andlater return them

# without actual executing the same query once againHaving the query

# cache enabled may result in significant speedimprovements, if your

# have a lot of identical queries and rarely changingtables See the

# "Qcache_lowmem_prunes" status variable tocheck if the current value

# is high enough for your load

# Note: In case your tables change very often or ifyour queries are

# textually different every time, the query cache mayresult in a

# slowdown instead of a performance improvement

query_cache_size=0

# The number of open tables for all threadsIncreasing this value

# increases the number of file descriptors that mysqldrequires

# Therefore you have to make sure to set the amount ofopen files

# allowed to at least 4096 in the variable"open-files-limit" in

# section [mysqld_safe]

table_cache=256

# Maximum size for internal (in-memory) temporarytables If a table

# grows larger than this value, it is automaticallyconverted to disk

# based table This limitation is for a single tableThere can be many

# of them

tmp_table_size=26M

# How many threads we should keep in a cache forreuse When a client

# disconnects, the client's threads are put in thecache if there aren't

# more than thread_cache_size threads frombefore This greatly reduces

# the amount of thread creations needed if you have alot of new

# connections (Normally this doesn't give a notableperformance

# improvement if you have a good threadimplementation)

thread_cache_size=8

# MyISAM Specific options

# The maximum size of the temporary file MySQL isallowed to use while

# recreating the index (during REPAIR, ALTER TABLE orLOAD DATA INFILE

# If the file-size would be bigger than this, theindex will be created

# through the key cache (which is slower)

myisam_max_sort_file_size=100G

# If the temporary file used for fast index creationwould be bigger

# than using the key cache by the amount specifiedhere, then prefer the

# key cache method This is mainly used to force long character keys in

# large tables to use the slower key cache method tocreate the index

myisam_sort_buffer_size=52M

# Size of the Key Buffer, used to cache index blocksfor MyISAM tables

# Do not set it larger than 30% of your available memory,as some memory

# is also required by the OS to cache rows Even ifyou're not using

# MyISAM tables, you should still set it to 8-64M asit will also be

# used for internal temporary disk tables

key_buffer_size=40M

# Size of the buffer used for doing full table scansof MyISAM tables

# Allocated per thread, if a full scan is needed

read_buffer_size=64K

read_rnd_buffer_size=256K

# This buffer is allocated when MySQL needs to rebuildthe index in

# REPAIR, OPTIMZE, ALTER table statements as well asin LOAD DATA INFILE

# into an empty table It is allocated per thread sobe careful with

# large settings

sort_buffer_size=256K

# INNODB Specific options

innodb_data_home_dir="d:\MySQL\Data\INNODB\"

# Use this option if you have a MySQL server withInnoDB support enabled

# but you do not plan to use it This will save memoryand disk space

# and speed up some things

#skip-innodb

# Additional memory pool that is used by InnoDB tostore metadata

# information If InnoDB requires more memory for this purpose it will

# start to allocate it from the OS As this is fast enough on most

# recent operating systems, you normally do not needto change this

# value SHOW INNODB STATUS will display the currentamount used

innodb_additional_mem_pool_size=2M

# If set to 1, InnoDB will flush (fsync) thetransaction logs to the

# disk at each commit, which offers full ACIDbehavior If you are

# willing to compromise this safety, and you arerunning small

# transactions, you may set this to 0 or 2 to reduce diskI/O to the

# logs Value 0 means that the log is only written tothe log file and

# the log file flushed to disk approximately once persecond Value 2

# means the log is written to the log file at eachcommit, but the log

# file is only flushed to disk approximately once persecond

innodb_flush_log_at_trx_commit=1

# The size of the buffer InnoDB uses for buffering logdata As soon as

# it is full, InnoDB will have to flush it to disk Asit is flushed

# once per second anyway, it does not make sense tohave it very large

# (even with long transactions)

innodb_log_buffer_size=1M

# InnoDB, unlike MyISAM, uses a buffer pool to cacheboth indexes and

# row data The bigger you set this the less disk I/Ois needed to

# access data in tables On a dedicated databaseserver you may set this

# parameter up to 80% of the machine physical memorysize Do not set it

# too large, though, because competition of thephysical memory may

# cause paging in the operating system Note that on 32bit systems you

# might be limited to 2-35G of user level memory perprocess, so do not

# set it too high

innodb_buffer_pool_size=77M

# Size of each log file in a log group You should setthe combined size

# of log files to about 25%-100% of your buffer poolsize to avoid

# unneeded buffer pool flush activity on log fileoverwrite However,

# note that a larger logfile size will increase thetime needed for the

# recovery process

innodb_log_file_size=39M

# Number of threads allowed inside the InnoDB kernelThe optimal value

# depends highly on the application, hardware as wellas the OS

# scheduler properties A too high value may lead tothread thrashing

innodb_thread_concurrency=8

配置文件结束

配置文件也放在了附件里,大家可以根据需要修改。

重点是以下配置,其中datadir的目录名称必须是data,并且好像必须是MySQL目录下的data之前自己制定了其他目录,一直出现1067的错误。

#Path to installation directory All paths are usuallyresolved relative to this

basedir="d:\MySQL\"

#Path to the database root

datadir="d:\MySQL\Data"

4、在windows环境变量里加入以下内容(方便执行命令行命令)

新建MYSQL_HOME="d:\MySQL\"

在Path里加入%MYSQL_HOME%\bin

5、将mysql注册为windows系统服务。具体 *** 作是在命令行中执行以下命令:

mysqld install MySQL --defaults-file="d:\MySQL\myini"

移除服务为 mysqld remove

6、第5步成功后,在命令行启动mysql

c:>net start mysql

陕西网络广播电视台直播中常出现:buffering(正在缓冲)无法播放,说明你所在区域即时网速不佳,或许和同一个服务线路由于用户过多造成网路拥堵,或者你家的网络连接设备有问题或插接不良等等原因,都会让你当时无法播放哦!换个时间试之即可解决问题。

数据库设置为utf-8 myini

# MySQL Server Instance Configuration File

# ----------------------------------------------------------------------

# Generated by the MySQL Server Instance Configuration Wizard

#

#

# Installation Instructions

# ----------------------------------------------------------------------

#

# On Linux you can copy this file to /etc/mycnf to set global options,

# mysql-data-dir/mycnf to set server-specific options

# (@localstatedir@ for this installation) or to

# ~/mycnf to set user-specific options

#

# On Windows you should keep this file in the installation directory

# of your server (eg C:\Program Files\MySQL\MySQL Server XY) To

# make sure the server reads the config file use the startup option

# "--defaults-file"

#

# To run run the server from the command line, execute this in a

# command line shell, eg

# mysqld --defaults-file="C:\Program Files\MySQL\MySQL Server XY\myini"

#

# To install the server as a Windows service manually, execute this in a

# command line shell, eg

# mysqld --install MySQLXY --defaults-file="C:\Program Files\MySQL\MySQL Server XY\myini"

#

# And then execute this in a command line shell to start the server, eg

# net start MySQLXY

#

#

# Guildlines for editing this file

# ----------------------------------------------------------------------

#

# In this file, you can use all long options that the program supports

# If you want to know the options a program supports, start the program

# with the "--help" option

#

# More detailed information about the individual options can also be

# found in the manual

#

#

# CLIENT SECTION

# ----------------------------------------------------------------------

#

# The following options will be read by MySQL client applications

# Note that only client applications shipped by MySQL are guaranteed

# to read this section If you want your own MySQL client program to

# honor these values, you need to specify it as an option during the

# MySQL client library initialization

#

[client]

port=3306

[mysql]

default-character-set=gb2312

# SERVER SECTION

# ----------------------------------------------------------------------

#

# The following options will be read by the MySQL Server Make sure that

# you have installed the server correctly (see above) so it reads this

# file

#

[mysqld]

# The TCP/IP Port the MySQL Server will listen on

port=3306

#Path to installation directory All paths are usually resolved relative to this

basedir="D:/Program Files/MySQL/MySQL Server 50/"

#Path to the database root

datadir="D:/Program Files/MySQL/MySQL Server 50/Data/"

# The default character set that will be used when a new schema or table is

# created and no character set is defined

default-character-set=gb2312

# The default storage engine that will be used when create new tables when

default-storage-engine=INNODB

# Set the SQL mode to strict

sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"

# The maximum amount of concurrent sessions the MySQL server will

# allow One of these connections will be reserved for a user with

# SUPER privileges to allow the administrator to login even if the

# connection limit has been reached

max_connections=100

# Query cache is used to cache SELECT results and later return them

# without actual executing the same query once again Having the query

# cache enabled may result in significant speed improvements, if your

# have a lot of identical queries and rarely changing tables See the

# "Qcache_lowmem_prunes" status variable to check if the current value

# is high enough for your load

# Note: In case your tables change very often or if your queries are

# textually different every time, the query cache may result in a

# slowdown instead of a performance improvement

query_cache_size=14M

# The number of open tables for all threads Increasing this value

# increases the number of file descriptors that mysqld requires

# Therefore you have to make sure to set the amount of open files

# allowed to at least 4096 in the variable "open-files-limit" in

# section [mysqld_safe]

table_cache=256

# Maximum size for internal (in-memory) temporary tables If a table

# grows larger than this value, it is automatically converted to disk

# based table This limitation is for a single table There can be many

# of them

tmp_table_size=17M

# How many threads we should keep in a cache for reuse When a client

# disconnects, the client's threads are put in the cache if there aren't

# more than thread_cache_size threads from before This greatly reduces

# the amount of thread creations needed if you have a lot of new

# connections (Normally this doesn't give a notable performance

# improvement if you have a good thread implementation)

thread_cache_size=8

# MyISAM Specific options

# The maximum size of the temporary file MySQL is allowed to use while

# recreating the index (during REPAIR, ALTER TABLE or LOAD DATA INFILE

# If the file-size would be bigger than this, the index will be created

# through the key cache (which is slower)

myisam_max_sort_file_size=100G

# If the temporary file used for fast index creation would be bigger

# than using the key cache by the amount specified here, then prefer the

# key cache method This is mainly used to force long character keys in

# large tables to use the slower key cache method to create the index

myisam_max_extra_sort_file_size=100G

# If the temporary file used for fast index creation would be bigger

# than using the key cache by the amount specified here, then prefer the

# key cache method This is mainly used to force long character keys in

# large tables to use the slower key cache method to create the index

myisam_sort_buffer_size=33M

# Size of the Key Buffer, used to cache index blocks for MyISAM tables

# Do not set it larger than 30% of your available memory, as some memory

# is also required by the OS to cache rows Even if you're not using

# MyISAM tables, you should still set it to 8-64M as it will also be

# used for internal temporary disk tables

key_buffer_size=22M

# Size of the buffer used for doing full table scans of MyISAM tables

# Allocated per thread, if a full scan is needed

read_buffer_size=64K

read_rnd_buffer_size=256K

# This buffer is allocated when MySQL needs to rebuild the index in

# REPAIR, OPTIMZE, ALTER table statements as well as in LOAD DATA INFILE

# into an empty table It is allocated per thread so be careful with

# large settings

sort_buffer_size=256K

# INNODB Specific options

# Use this option if you have a MySQL server with InnoDB support enabled

# but you do not plan to use it This will save memory and disk space

# and speed up some things

#skip-innodb

# Additional memory pool that is used by InnoDB to store metadata

# information If InnoDB requires more memory for this purpose it will

# start to allocate it from the OS As this is fast enough on most

# recent operating systems, you normally do not need to change this

# value SHOW INNODB STATUS will display the current amount used

innodb_additional_mem_pool_size=2M

# If set to 1, InnoDB will flush (fsync) the transaction logs to the

# disk at each commit, which offers full ACID behavior If you are

# willing to compromise this safety, and you are running small

# transactions, you may set this to 0 or 2 to reduce disk I/O to the

# logs Value 0 means that the log is only written to the log file and

# the log file flushed to disk approximately once per second Value 2

# means the log is written to the log file at each commit, but the log

# file is only flushed to disk approximately once per second

innodb_flush_log_at_trx_commit=1

# The size of the buffer InnoDB uses for buffering log data As soon as

# it is full, InnoDB will have to flush it to disk As it is flushed

# once per second anyway, it does not make sense to have it very large

# (even with long transactions)

innodb_log_buffer_size=1M

# InnoDB, unlike MyISAM, uses a buffer pool to cache both indexes and

# row data The bigger you set this the less disk I/O is needed to

# access data in tables On a dedicated database server you may set this

# parameter up to 80% of the machine physical memory size Do not set it

# too large, though, because competition of the physical memory may

# cause paging in the operating system Note that on 32bit systems you

# might be limited to 2-35G of user level memory per process, so do not

# set it too high

innodb_buffer_pool_size=40M

# Size of each log file in a log group You should set the combined size

# of log files to about 25%-100% of your buffer pool size to avoid

# unneeded buffer pool flush activity on log file overwrite However,

# note that a larger logfile size will increase the time needed for the

# recovery process

innodb_log_file_size=10M

# Number of threads allowed inside the InnoDB kernel The optimal value

# depends highly on the application, hardware as well as the OS

# scheduler properties A too high value may lead to thread thrashing

innodb_thread_concurrency=10

 MySQL数据库:

MySQL是一种开放源代码的关系型数据库管理系统(RDBMS),使用最常用的数据库管理语言--结构化查询语言(SQL)进行数据库管理。

MySQL是开放源代码的,因此任何人都可以在General Public License的许可下下载并根据个性化的需要对其进行修改。

MySQL因为其速度、可靠性和适应性而备受关注。大多数人都认为在不需要事务化处理的情况下,MySQL是管理内容最好的选择。

数据库简介:

MySQL是一种开放源代码的关系型数据库管理系统(RDBMS),MySQL数据库系统使用最常用的数据库管理语言--结构化查询语言(SQL)进行数据库管理。

由于MySQL是开放源代码的,因此任何人都可以在General Public License的许可下下载并根据个性化的需要对其进行修改。MySQL因为其速度、可靠性和适应性而备受关注。大多数人都认为在不需要事务化处理的情况下,MySQL是管理内容最好的选择。

MySQL这个名字,起源不是很明确。一个比较有影响的说法是,基本指南和大量的库和工具带有前缀“my”已经有10年以上,而且不管怎样,MySQL AB创始人之一的Monty Widenius的女儿也叫My。这两个到底是哪一个给出了MySQL这个名字至今依然是个迷,包括开发者在内也不知道。

MySQL的海豚标志的名字叫“sakila”,它是由MySQL AB的创始人从用户在“海豚命名”的竞赛中建议的大量的名字表中选出的。获胜的名字是由来自非洲斯威士兰的开源软件开发者Ambrose Twebaze提供。根据Ambrose所说,Sakila来自一种叫SiSwati的斯威士兰方言,也是在Ambrose的家乡乌干达附近的坦桑尼亚的Arusha的一个小镇的名字。

MySQL,虽然功能未必很强大,但因为它的开源、广泛传播,导致很多人都了解到这个数据库。它的历史也富有传奇性。

MySQL数据库历史:

MySQL的历史最早可以追溯到1979年,那时Oracle也才小打小闹,微软的SQL Server影子都没有。有一个人叫Monty Widenius, 为一个叫TcX的小公司打工,并用BASIC设计了一个报表工具,可以在4M主频和16KB内存的计算机上运行。过了不久,又将此工具,使用C语言重写,移植到Unix平台,当时,它只是一个很底层的面向报表的存储引擎。这个工具叫做Unireg。

可是,这个小公司资源有限,Monty天赋极高,面对资源有限的不利条件,他反而更能发挥潜能,总是力图写出最高效的代码。并因此养成了习惯。与Monty同在一起的还有一些别的同事,很少有人能坚持把那些代码持续写到20年后,而Monty却做到了。

1990年,TcX的customer 中开始有人要求要为它的API提供SQL支持,当时,有人想到了直接使用商用数据库算了,但是Monty觉得商用数据库的速度难令人满意。于是,他直接借助于mSQL的代码,将它集成到自己的存储引擎中。但不巧的是,效果并不太好。于是, Monty雄心大起,决心自己重写一个SQL支持。

1996年,MySQL 10发布,只面向一小拨人,相当于内部发布。到了96年10月,MySQL 3111发布了,呵呵,没有2x版本。最开始,只提供了Solaris下的二进制版本。一个月后,Linux版本出现了。

紧接下来的两年里,MySQL依次移植到各个平台下。它发布时,采用的许可策略,有些与众不同:允许免费商用,但是不能将MySQL与自己的产品绑定在一起发布。如果想一起发布,就必须使用特殊许可,意味着要花银子。当然,商业支持也是需要花银子的。其它的,随用户怎么用都可以。这种特殊许可为MySQL带来了一些收入,从而为它的持续发展打下了良好的基础。(细想想,PostgreSQL曾经有几年限入低谷,可能与它的完全免费,不受任何限制有关系)。

MySQL322应该是一个标志性的版本,提供了基本的SQL支持。

MySQL关系型数据库于1998年1月发行第一个版本。它使用系统核心提供的多线程机制提供完全的多线程运行模式,提供了面向C、C++、Eiffel、Java、Perl、PHP、Python以及Tcl等编程语言的编程接口(APIs),支持多种字段类型并且提供了完整的 *** 作符支持查询中的SELECT和WHERE *** 作。

MySQL是开放源代码的,因此任何人都可以在General Public License的许可下下载并根据个性化的需要对其进行修改。MySQL因为其速度、可靠性和适应性而备受关注。

1999-2000年,有一家公司在瑞典成立了,叫MySQL AB (AB是瑞典语“股份公司”的意思)。 雇了几个人,与Sleepycat合作,开发出了 Berkeley DB引擎, 因为BDB支持事务处理,所以,MySQL从此开始支持事务处理了。

2000年4月,MySQL对旧的存储引擎进行了整理,命名为MyISAM。同时,2001年,Heikiki Tuuri向MySQL提出建议,希望能集成他们的存储引擎InnoDB,这个引擎同样支持事务处理,还支持行级锁。

如今,遗憾的是,BDB和InnoDB好像都被Oracle收购了,为了消灭竞争对手,哪怕是开源的,都是不择手段。

MySQL与InnoDB的正式结合版本是40。

到了MySQL50,2003年12月,开始有View,存储过程之类的东东,当然,其间, bug也挺多。

在2008年1月16号 MySQL被Sun公司收购。

最近,MySQL的创始人Monty Widenius已经向Sun提交了辞呈。head都要走了。

据说,被Sun收购的公司多薄命,不知道MySQL今后前途如何,希望一路走好。相信MySQL的生命力还是很长久的。

时至今日 mysql 和 php 的结合绝对是完美很多大型的网站也用到mysql数据库mysql的发展前景是非常光明的!

MySQL常用命令:

1:使用SHOW语句找出在服务器上当前存在什么数据库:

mysql> SHOW DATABASES;

2:2、创建一个数据库MYSQLDATA

mysql> CREATE DATABASE MYSQLDATA;

3:选择你所创建的数据库

mysql> USE MYSQLDATA; (按回车键出现Database changed 时说明 *** 作成功!)

4:查看现在的数据库中存在什么表

mysql> SHOW TABLES;

5:创建一个数据库表

mysql> CREATE TABLE MYTABLE (name VARCHAR(20), sex CHAR(1));

6:显示表的结构:

mysql> DESCRIBE MYTABLE;

7:往表中加入记录

mysql> insert into MYTABLE values (”hyq”,”M”);

8:用文本方式将数据装入数据库表中(例如D:/mysqltxt)

mysql> LOAD DATA LOCAL INFILE “D:/mysqltxt” INTO TABLE MYTABLE;

9:导入sql文件命令(例如D:/mysqlsql)

mysql>use database;

mysql>source d:/mysqlsql;

10:删除表

mysql>drop TABLE MYTABLE;

11:清空表

mysql>delete from MYTABLE;

12:更新表中数据

mysql>update MYTABLE set sex=”f” where name=’hyq’;

全局管理权限对应解释:

FILE: 在MySQL服务器上读写文件。

PROCESS: 显示或杀死属于其它用户的服务线程。

RELOAD: 重载访问控制表,刷新日志等。

SHUTDOWN: 关闭MySQL服务。

数据库/数据表/数据列权限:

ALTER: 修改已存在的数据表(例如增加/删除列)和索引。

CREATE: 建立新的数据库或数据表。

DELETE: 删除表的记录。

DROP: 删除数据表或数据库。

INDEX: 建立或删除索引。

INSERT: 增加表的记录。

SELECT: 显示/搜索表的记录。

UPDATE: 修改表中已存在的记录。

特别的权限:

ALL: 允许做任何事(和root一样)。

USAGE: 只允许登录–其它什么也不允许做。

MySQL数据库导入方法:

MySQL数据库的导入,有两种方法:

1) 先导出数据库SQL脚本,再导入;

2) 直接拷贝数据库目录和文件。

在不同 *** 作系统或MySQL版本情况下,直接拷贝文件的方法可能会有不兼容的情况发生。

所以一般推荐用SQL脚本形式导入。下面分别介绍两种方法。

2 方法一 SQL脚本形式

*** 作步骤如下:

21 导出SQL脚本

在原数据库服务器上,可以用phpMyAdmin工具,或者mysqldump命令行,导出SQL脚本。

211 用phpMyAdmin工具

导出选项中,选择导出“结构”和“数据”,不要添加“DROP DATABASE”和“DROP TABLE”选项。

选中“另存为文件”选项,如果数据比较多,可以选中“gzipped”选项。

将导出的SQL文件保存下来。

212 用mysqldump命令行

命令格式

mysqldump -u 用户名 -p 数据库名 > 数据库名sql

范例:

mysqldump -u root -p abc > abcsql

(导出数据库abc到abcsql文件)

提示输入密码时,输入该数据库用户名的密码。

22 创建空的数据库

通过主控界面/控制面板,创建一个数据库。假设数据库名为abc,数据库全权用户为abc_f。

23 将SQL脚本导入执行

同样是两种方法,一种用phpMyAdmin(mysql数据库管理)工具,或者mysql命令行。

231 用phpMyAdmin工具

从控制面板,选择创建的空数据库,点“管理”,进入管理工具页面。

在"SQL"菜单中,浏览选择刚才导出的SQL文件,点击“执行”以上载并执行。

注意:phpMyAdmin对上载的文件大小有限制,php本身对上载文件大小也有限制,如果原始sql文件

比较大,可以先用gzip对它进行压缩,对于sql文件这样的文本文件,可获得1:5或更高的压缩率。

gzip使用方法:

# gzip xxxxxsql

得到

xxxxxsqlgz文件。

提示输入密码时,输入该数据库用户名的密码。

3 直接拷贝

如果数据库比较大,可以考虑用直接拷贝的方法,但不同版本和 *** 作系统之间可能不兼容,要慎用。

31 准备原始文件

用tar打包为一个文件

32 创建空数据库

33 解压

在临时目录中解压,如:

cd /tmp

tar zxf mydbtargz

34 拷贝

将解压后的数据库文件拷贝到相关目录

cd mydb/

cp /var/lib/mysql/mydb/

对于FreeBSD:

cp /var/db/mysql/mydb/

35 权限设置

将拷贝过去的文件的属主改为mysql:mysql,权限改为660

chown mysql:mysql /var/lib/mysql/mydb/

chmod 660 /var/lib/mysql/mydb/

Mssql转换mysql的方法:

1导表结构

使用MySQL生成create脚本的方法。找到生成要导出的脚本,按MySQL的语法修改一下到MySQL数据库中创建该表的列结构什么的。

2导表数据

在MSSQL端使用bcp导出文本文件:

bcp “Select FROM dbnamedbotablename;” queryout tablenametxt -c -Slocalhost\db2005 -Usa

其中”"中是要导出的sql语句,-c指定使用\t进行字段分隔,使用\n进行记录分隔,-S指定数据库服务器及实例,-U指定用户名,-P指定密码

在MySQL端使用mysqlimport 导入文本文件到相应表中

mysqlimport -uroot -p databasename /home/test/tablenametxt

其中-u指定用户名,-p指定密码,databasename指定数据库名称,表名与文件名相同

MySQL备份与恢复:

MySQL备份恢复数据的一般步骤

备份一个数据库的例子:

1、备份前读锁定涉及的表

mysql>LOCK TABLES tbl1 READ,tbl1 READ,…

如果,你在mysqldump实用程序中使用--lock-tables选项则不必使用如上SQL语句。

2、导出数据库中表的结构和数据

shell>mysqldump --opt db_name>db_namesql

3、启用新的更新日志

shell>mysqladmin flush-logs

这样可以记录你备份后的数据改变为恢复数据准备。

4、解除表的读锁

mysql>UNLOCK TABLES;

为了加速上述过程,你可以这样做:

shell> mysqldump --lock-tables --opt db_name>db_namesql; mysqladmin flush-logs

但是这样可能会有点小问题。上命令在启用新的更新日志前就恢复表的读锁,

在更新繁忙的站点,可能有备份后的更新数据没有记录在新的日志中。

现在恢复上面备份的数据库

1、对涉及的表使用写锁

mysql>LOCK TABLES tbl1 WRITE,tbl1 WRITE,…

2、恢复备份的数据

shell>mysql db_name < db_namesql

3、恢复更新日志的内容

shell>mysql --one-database db_name < hostnamennn

假设需要使用的日志名字为hostnamennn

4、启用新的更新日志

shell>mysqladmin flush-logs

5、解除表的写锁

mysql>UNLOCK TABLES;

希望上面的例子能给你启发,因为备份数据的手法多种多样,你所使用的和上面所述可能大不一样,但是对于备份和恢复中,表的锁定、启用新的更新日志的时机应该是类似的,仔细考虑这个问题。

MySQL数据库优化:

选择InnoDB作为存储引擎

大型产品的数据库对于可靠性和并发性的要求较高,InnoDB作为默认的MySQL存储引擎,相对于MyISAM来说是个更佳的选择。

优化数据库结构

组织数据库的schema、表和字段以降低I/O的开销,将相关项保存在一起,并提前规划,以便随着数据量的增长,性能可以保持较高的水平。

设计数据表应尽量使其占用的空间最小化,表的主键应尽可能短。·对于InnoDB表,主键所在的列在每个辅助索引条目中都是可复制的,因此如果有很多辅助索引,那么一个短的主键可以节省大量空间。

仅创建你需要改进查询性能的索引。索引有助于检索,但是会增加插入和更新 *** 作的执行时间。

InnoDB的ChangeBuffering特性

InnoDB提供了changebuffering的配置,可减少维护辅助索引所需的磁盘I/O。大规模的数据库可能会遇到大量的表 *** 作和大量的I/O,以保证辅助索引保持最新。当相关页面不在缓冲池里面时,InnoDB的changebuffer将会更改缓存到辅助索引条目,从而避免因不能立即从磁盘读取页面而导致耗时的I/O *** 作。当页面被加载到缓冲池时,缓冲的更改将被合并,更新的页面之后会刷新到磁盘。这样做可提高性能,适用于MySQL55及更高版本。

InnoDB页面压缩

InnoDB支持对表进行页面级的压缩。当写入数据页的时候,会有特定的压缩算法对其进行压缩。压缩后的数据会写入磁盘,其打孔机制会释放页面末尾的空块。如果压缩失败,数据会按原样写入。表和索引都会被压缩,因为索引通常是数据库总大小中占比很大的一部分,压缩可以显著节约内存,I/O或处理时间,这样就达到了提高性能和伸缩性的目的。它还可以减少内存和磁盘之间传输的数据量。MySQL51及更高版本支持该功能。

注意,页面压缩并不能支持共享表空间中的表。共享表空间包括系统表空间、临时表空间和常规表空间。

使用批量数据导入

在主键上使用已排序的数据源进行批量数据的导入可加快数据插入的过程。否则,可能需要在其他行之间插入行以维护排序,这会导致磁盘I/O变高,进而影响性能,增加页的拆分。关闭自动提交的模式也是有好处的,因为它会为每个插入执行日志刷新到磁盘。在批量插入期间临时转移唯一键和外键检查也可显著降低磁盘I/O。对于新建的表,最好的做法是在批量导入后创建外键/唯一键约束。

一旦你的数据达到稳定的大小,或者增长的表增加了几十或几百兆字节,就应该考虑使用OPTIMIZETABLE语句重新组织表并压缩浪费的空间。对重新组织后的表进行全表扫描所需要的I/O会更少。

优化InnoDB磁盘I/O

增加InnoDB缓冲池大小可以让查询从缓冲池访问而不是通过磁盘I/O访问。通过调整系统变量innodb_flush_method来调整清除缓冲的指标使其达到最佳水平。

MySQL的内存分配

在为MySQL分配足够的内存之前,请考虑不同领域对MySQL的内存需求。要考虑的关键领域是:并发连接——对于大量并发连接,排序和临时表将需要大量内存。在撰写本文时,对于处理3000+并发连接的数据库,16GB到32GB的RAM是足够的。

内存碎片可以消耗大约10%或更多的内存。像innodb_buffer_pool_size、key_buffer_size、query_cache_size等缓存和缓冲区要消耗大约80%的已分配内存。

日常维护

定期检查慢的查询日志并优化查询机制以有效使用缓存来减少磁盘I/O。优化它们,以扫描最少的行数,而不是进行全表扫描。

其他可以帮助DBA检查和分析性能的日志包括:错误日志、常规查询日志、二进制日志、DDL日志(元数据日志)。

定期刷新缓存和缓冲区以降低碎片化。使用OPTIMIZETABLE语句重新组织表并压缩任何可能被浪费的空间。

以上就是关于nvidia中的管理3d设置中的三重缓冲有什么作用全部的内容,包括:nvidia中的管理3d设置中的三重缓冲有什么作用、mysql win7 64位 安装、陕西网络广播电视台直播中常出现:buffering...,无法播放等相关内容解答,如果想了解更多相关内容,可以关注我们,你们的支持是我们更新的动力!

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/sjk/9626154.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-04-30
下一篇 2023-04-30

发表评论

登录后才能评论

评论列表(0条)

保存