(해시조인과 관련된 오라클힌트)해시조인은 두테이블 중 작은 테이블(Build Input, Driving Table)을 메모리에 조인키를 기반으로 해시테이블을 생성하고 해시테이블내에 행들을 위치시키기 위해 해시함수를 이용하며 나머지 테이블을 스캔하면서 메모리에 있는 해시테이블과 조인 조건을 만족하는 데이터를 찾는 조인이다. 중첩루프조인과 같이 조인시 발생하는 랜덤액세스에 대한 부하가 없는 조인방식이다. 관계형 데이터베이스에서 가장 비용이 많이 들어가는 조인방법으로 주로 작은 테이블과 큰 테이블의 조인 시 사용되며 , 드라이빙 조건과 상관없이 좋은 성능을 발휘할 수 있는 조인 방법이며 대체로 제일 빠르다.
Linux con europe_2014_full_system_rollback_btrfs_snapper_0sprdd
This document discusses using Btrfs and Snapper to enable full system rollbacks. It describes how snapshots are used to capture the state of the system at different points in time. These snapshots can then be used to rollback the entire system to a previous known good state, reducing downtime from system issues or configuration changes. The key capabilities of Snapshots include automatically capturing changes, displaying differences between snapshots, and rolling back to previous states. Integration with tools like YaST allow visualizing and undoing changes at the file level, while full system rollback supports reverting the entire operating system, including the kernel.
The document discusses NoSQL APIs in MySQL. It provides an overview of the memcached caching system and the history of the HandlerSocket protocol. It then describes the NoSQL interface introduced in MySQL 5.6, which allows for memcached-style operations on MySQL data. It notes that MySQL 5.7 further improved the performance and scalability of this interface.
The document outlines changes and new features in MySQL versions 5.7 through upcoming releases. Key points include:
- MySQL 5.7 development follows a milestone release process to stabilize new features before general availability. Four development milestone releases have been completed so far.
- Notable 5.7 features include statement timeouts, change replication without stopping SQL threads, and performance improvements like optimized UNION ALL queries.
- Some existing functionality will change in 5.7, like making replication more durable by default and producing errors for queries with only partial GROUP BY clauses.
- Ongoing efforts include refactoring and improving InnoDB, the optimizer, and other components for better performance and scalability. New features in development
This document discusses various methods for optimizing performance of MySQL databases, including upgrading hardware and software, optimizing configuration settings, optimizing queries, and optimizing database schemas. It provides an example of using EXPLAIN plans and adding indexes to optimize queries on a database table to improve performance. The author recommends focusing on query optimization as the best method, using profilers and slow query logs to identify queries to optimize.
MySQL 5.7 proposes several changes to improve performance and consistency including:
1. Making replication durable by default by setting sync_binlog and repository options.
2. Deprecating features like INNODB monitor tables and ALTER IGNORE TABLE in favor of newer standards.
3. Simplifying and restricting SQL modes to encourage stricter querying and remove ambiguous options. Explanations for errors and modes will also be improved.
MySQL 5.6 - Operations and Diagnostics ImprovementsMorgan Tocker
This document discusses MySQL 5.6 and its improvements to operational and diagnostic capabilities. Key enhancements include online DDL operations that do not block reads or writes, buffer pool dump and restore for faster startup, import/export of partitioned tables, and transportable tablespaces. Diagnostic tools were improved with EXPLAIN showing more details, the ability to EXPLAIN updates and deletes, optimizer tracing, and the performance schema providing detailed query level instrumentation and monitoring by default.
This document provides an overview of MySQL for Linux system administrators. It discusses MySQL architecture including storage engines, memory usage, the MySQL server process, and InnoDB transaction processing. It also covers topics like backups and replication, and the agenda includes performance and capacity planning. The goal is to help system administrators understand and manage MySQL databases.
The document provides an overview of the InnoDB storage engine used in MySQL. It discusses InnoDB's architecture including the buffer pool, log files, and indexing structure using B-trees. The buffer pool acts as an in-memory cache for table data and indexes. Log files are used to support ACID transactions and enable crash recovery. InnoDB uses B-trees to store both data and indexes, with rows of variable length stored within pages.
This document appears to be a slide presentation given by Giuseppe Maxia about MySQL. Some key points made in the presentation include:
- Giuseppe introduces himself and his background with MySQL.
- MySQL is presented as a solution for startups and small businesses due to its low cost, ease of use, and stability.
- MySQL has a large user base powering many major websites and has a business model of offering additional services to larger customers.
- The MySQL community is highlighted as contributing to many open source projects and tools.
The document discusses MySQL architecture and concepts. It describes the application layer where users interact with the MySQL database. It then explains the logical layer which includes subsystems like the query processor, transaction management, recovery management and storage management that work together to process requests. Key concepts like concurrency control, locks, transactions, storage engines and InnoDB/MyISAM are also overviewed.
This document provides an overview and instructions for installing and using the MySQL database system. It describes MySQL's client-server architecture, how to connect to the MySQL server using the command line client, and provides examples of common SQL commands for creating databases and tables, inserting, selecting, updating, and deleting rows of data. It also introduces some basic SQL functions and provides SQL scripts as examples to create tables and insert data.
탑크리에듀교육센터(www.topcredu.co.kr)제공
스프링프레임워크 & 마이바티스(Spring Framework, MyBatis)
17번째 자료입니다. 참고하시어 많은 도움되셨길 바랍니다.
교육 및 수강문의/기타문의사항은 홈페이지(www.topcredu.co.kr)를 통하여 하실 수 있습니다.^^
탑크리에듀교육센터(www.topcredu.co.kr)제공
스프링프레임워크 & 마이바티스(Spring Framework, MyBatis)
16번째 자료입니다. 참고하시어 많은 도움되셨길 바랍니다.
교육 및 수강문의/기타문의사항은 홈페이지(www.topcredu.co.kr)를 통하여 하실 수 있습니다.^^
6. 패스워드 변경하고 가실게요
$ UPDATE mysql.user SET
password=passowrd(‘사용할암호’) WHERE
user=‘root’
$ 뜻을 알건 모르건 일단 바꾸고 봅시다..
7. DB
$ 어떤 db가 있나 보자
> show databases;
$ db를 사용하기 위해 선택하자.
> use database_name
>ex) use mysql;
8. 내 DB 만들기
$ CREATE DATABASE db_name
> CREATE DATABASE webhacking;
$ CREATE TABLE table_name(
column name type option,…)
> CREATE TABLE member(
user_id varchar(20) NOT NULL,
user_pw varchar(20) NOT NULL,
nickname varchar(20),
PRIMARY KEY(user_id));
10. 값을 넣어보자.
$ INSERT INTO tablename values(a1,a2..);
> INSERT INTO account values(‘sakuya’,’1234’,’SAKUYA’);
$ INSERT INTO
tablename(c1,c2..)
values(a1,a2..);
> INSERT INTO
member(user_id, user_pw, nickname)
value(‘sakuya’,1234 , user_id);
11. 연달아서 입력
$ INSERT INTO member values
('sakuya','1234','SAKUYA'),
('fear2fear','4321','131ackcon'),
('commio0','bluebit','redbit'),
('python','URYY',user_id),
('ruby',abs(-1234),'sapphire');
$ 함수, 컬럼도 가능함
$ Mysql 주석 : #, --, /**/
12. 조회
$ SELECT column FROM tablename WHERE
condition
> SELECT nickname FROM member WHERE
user_id=‘sakuya’;
$ SELECT * FROM tablename WHERE
contidion
> SELECT * FROM member WHERE
user_id=‘sakuya’;
15. 가입 페이지 만들기
$ 가입 페이지의 개략적인 형태
<?
include ‘db_conn.php’
$inp_id = $_POST[id];
$inp_pw= $_POST[pw];
$inp_nick = $_POST[nick];
//Send to Mysql
$query = ‘INSERT INTO account values
(‘.$inp_id.’,’.$inp_pw.’,’.$inp_nick.’)’
?>
16. 로그인 페이지 만들기
$ 로그인 페이지의 개략적인 형태
<?
include ‘db_conn.php’
$inp_id = $_GET[id];
$inp_pw= $_GET[pw];
$query = ‘SELECT * FROM account WHERE
user_id =’.$inp_id.’ and ‘.$inp_pw;
$row =mysql_fetch_array(mysql_query($query,$conn))
if($row)
echo “Hello, ”$row[user_id];
else
echo “Who are you?”
?>
web/2/login/join.php
web/2/login/_login.php
42. ascii의 값을
$ if로 넣어서 비교.
> 그 이후 참/거짓에 따라서 값을 반환.
if( <0,5,3)(select table_name from information_schema.tables limit 1,1)substr( ,1,1)ascii( )COLLATIONS
43. ascii의 값을
$ if로 넣어서 비교.
> 그 이후 참/거짓에 따라서 값을 반환.
if( <0,5,3)substr( ,1,1)ascii( )COLLATIONS
44. ascii의 값을
$ if로 넣어서 비교.
> 그 이후 참/거짓에 따라서 값을 반환.
if( <0,5,3)ascii( )C 67
45. ascii의 값을
$ if로 넣어서 비교.
> 그 이후 참/거짓에 따라서 값을 반환.
if( <0,5,3)67
3
48. 어떻게 할 것인가
$ PHP.ini => magic_quoat 옵션 ON
> ‘, %00 등의 문자 앞에 를 붙여서 스트링으
로 인식하게 해줌
> magic_quoat 도 특수한 경우엔 우회가 가능함
$ Black List ? White list ?
> ex) 숫자의 입력을 받는곳에 문자열의 입력은
필요없다.