<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>数据库 on Even - A super concise theme for Hugo</title>
    <link>http://localhost:1313/tags/%E6%95%B0%E6%8D%AE%E5%BA%93/</link>
    <description>Recent content in 数据库 on Even - A super concise theme for Hugo</description>
    <generator>Hugo</generator>
    <language>en</language>
    <lastBuildDate>Sun, 04 Dec 2022 00:00:00 +0000</lastBuildDate>
    <atom:link href="http://localhost:1313/tags/%E6%95%B0%E6%8D%AE%E5%BA%93/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Mysql修改root密码</title>
      <link>http://localhost:1313/posts/workspace/01-tech/database/mysql/mysql%E4%BF%AE%E6%94%B9root%E5%AF%86%E7%A0%81/</link>
      <pubDate>Sun, 04 Dec 2022 00:00:00 +0000</pubDate>
      <guid>http://localhost:1313/posts/workspace/01-tech/database/mysql/mysql%E4%BF%AE%E6%94%B9root%E5%AF%86%E7%A0%81/</guid>
      <description>&lt;h1 id=&#34;mysql修改root密码&#34;&gt;Mysql修改root密码&lt;/h1&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;背景：linux系统，忘记mysql的root密码，该怎么修改root密码？&lt;/p&gt;&lt;/blockquote&gt;&#xA;&lt;p&gt;复制阿里云的在线服务中提出的解决方案👇。亲测ok&lt;/p&gt;&#xA;&lt;p&gt;如果忘记了MySQL数据库root用户的密码，可以通过修改配置文件，登录时跳过密码，然后在数据库里面修改密码。一般数据库默认的用户为root。&lt;/p&gt;</description>
    </item>
    <item>
      <title>oracle-&gt;mysql数据迁移数据事项</title>
      <link>http://localhost:1313/posts/workspace/01-tech/database/mysql/oracle_to_mysql%E6%95%B0%E6%8D%AE%E8%BF%81%E7%A7%BB%E6%95%B0%E6%8D%AE%E4%BA%8B%E9%A1%B9/</link>
      <pubDate>Sun, 04 Dec 2022 00:00:00 +0000</pubDate>
      <guid>http://localhost:1313/posts/workspace/01-tech/database/mysql/oracle_to_mysql%E6%95%B0%E6%8D%AE%E8%BF%81%E7%A7%BB%E6%95%B0%E6%8D%AE%E4%BA%8B%E9%A1%B9/</guid>
      <description>&lt;h1 id=&#34;oracle-mysql数据迁移数据事项&#34;&gt;oracle-&amp;gt;mysql数据迁移数据事项&lt;/h1&gt;&#xA;&lt;h2 id=&#34;概述&#34;&gt;概述&lt;/h2&gt;&#xA;&lt;p&gt;从oracle数据迁移到mysql前，需要特别关注两者的区别，才能做好相应的转换及评估。&lt;/p&gt;&#xA;&lt;h2 id=&#34;oraclemysql主要差异&#34;&gt;ORACLE&amp;amp;MYSQL主要差异&lt;/h2&gt;&#xA;&lt;p&gt;图片来源： &lt;a href=&#34;https://www.infoq.cn/article/rc7urvfsmv94jcaw3z2a&#34;&gt;https://www.infoq.cn/article/rc7urvfsmv94jcaw3z2a&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img src=&#34;https://static001.geekbang.org/infoq/de/de7533f37e58ae8758f0c7371a2a3c94.png&#34; alt=&#34;img&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img src=&#34;https://static001.geekbang.org/infoq/31/3182494a12a4ffc10c333d3df882adb3.png&#34; alt=&#34;img&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img src=&#34;https://static001.geekbang.org/infoq/e7/e74b6405244a74d3cad677574dc24376.png&#34; alt=&#34;img&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img src=&#34;https://static001.geekbang.org/infoq/73/7370fba14f9eb3aab0cc0a3a81e2b235.png&#34; alt=&#34;img&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img src=&#34;https://static001.geekbang.org/infoq/b8/b826db1d87750d72b02e1bc26c1c0139.png&#34; alt=&#34;img&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img src=&#34;https://static001.geekbang.org/infoq/fd/fd56cf61c0d95e44110c08c4e4b0820c.png&#34; alt=&#34;img&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img src=&#34;https://static001.geekbang.org/infoq/77/77ba5aab1805f09626e84398f3b95a12.png&#34; alt=&#34;img&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img src=&#34;https://static001.geekbang.org/infoq/cf/cf18e3da28c33054dfc8b2b56b8f6cf8.png&#34; alt=&#34;img&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img src=&#34;https://static001.geekbang.org/infoq/54/54994c5023f3b166416499d01b41b8ca.png&#34; alt=&#34;img&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img src=&#34;https://static001.geekbang.org/infoq/84/84c143bce3271abff28c9c36e4f697ef.png&#34; alt=&#34;img&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img src=&#34;https://static001.geekbang.org/infoq/99/99ed2a74b59eb477924fca534cb2c323.png&#34; alt=&#34;img&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img src=&#34;https://static001.infoq.cn/resource/image/22/cd/22ca871d8be85482b510a6ed7d62b9cd.jpg&#34; alt=&#34;img&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;mysql-不支持的功能项&#34;&gt;MySQL 不支持的功能项&lt;/h3&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;MySQL 没有并行的概念，不支持并行；&lt;/li&gt;&#xA;&lt;li&gt;MySQL 优化器较弱，复杂 SQL 建议拆分简单 SQL；&lt;/li&gt;&#xA;&lt;li&gt;MySQL 对于子查询优化不是很好；&lt;/li&gt;&#xA;&lt;li&gt;MySQL 不支持物化视图、存储过程改造、同义词改造、dblink 需要改造。&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;迁移原则&#34;&gt;迁移原则&lt;/h2&gt;&#xA;&lt;p&gt;参考： &lt;a href=&#34;https://www.infoq.cn/article/rc7urvfsmv94jcaw3z2a&#34;&gt;https://www.infoq.cn/article/rc7urvfsmv94jcaw3z2a&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Mysql导入导出</title>
      <link>http://localhost:1313/posts/workspace/01-tech/database/mysql/mysql%E5%AF%BC%E5%85%A5%E5%AF%BC%E5%87%BA/</link>
      <pubDate>Sun, 27 Nov 2022 00:00:00 +0000</pubDate>
      <guid>http://localhost:1313/posts/workspace/01-tech/database/mysql/mysql%E5%AF%BC%E5%85%A5%E5%AF%BC%E5%87%BA/</guid>
      <description>&lt;h1 id=&#34;mysql导入导出&#34;&gt;Mysql导入导出&lt;/h1&gt;&#xA;&lt;h2 id=&#34;导出&#34;&gt;导出&lt;/h2&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;mysqldump&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;(1) 导出完整数据：&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;mysqldump -u用户名 -p 数据库名 &amp;gt; 数据库名.sql&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;例如：&lt;code&gt;# /usr/local/mysql/bin/mysqldump -uroot -p abc &amp;gt; abc.sql&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;(2) 只导出表结构（使用&lt;code&gt; -d&lt;/code&gt; 选项）：&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;mysqldump -u用户名 -p -d 数据库名 &amp;gt; 数据库名.sql&lt;/code&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>数据库分页查询</title>
      <link>http://localhost:1313/posts/workspace/01-tech/database/%E6%95%B0%E6%8D%AE%E5%BA%93%E5%88%86%E9%A1%B5%E6%9F%A5%E8%AF%A2/</link>
      <pubDate>Mon, 21 Nov 2022 00:00:00 +0000</pubDate>
      <guid>http://localhost:1313/posts/workspace/01-tech/database/%E6%95%B0%E6%8D%AE%E5%BA%93%E5%88%86%E9%A1%B5%E6%9F%A5%E8%AF%A2/</guid>
      <description>&lt;h1 id=&#34;数据库分页查询&#34;&gt;数据库分页查询&lt;/h1&gt;&#xA;&lt;p&gt;数据库分页语句使用&lt;code&gt;limit&lt;/code&gt;语法来实现。除了基础的limit用法，还有一些优化的方法。&lt;/p&gt;&#xA;&lt;h2 id=&#34;limit基础用法&#34;&gt;LIMIT基础用法&lt;/h2&gt;&#xA;&lt;p&gt;&lt;code&gt;SELECT * FROM table LIMIT [offset,] rows | rows OFFSET offset&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;参数1表示偏移量，参数2表示返回记录行的最大数目。&lt;/p&gt;</description>
    </item>
    <item>
      <title>数据库日志基础</title>
      <link>http://localhost:1313/posts/workspace/01-tech/database/%E6%95%B0%E6%8D%AE%E5%BA%93%E6%97%A5%E5%BF%97%E5%9F%BA%E7%A1%80/</link>
      <pubDate>Mon, 21 Nov 2022 00:00:00 +0000</pubDate>
      <guid>http://localhost:1313/posts/workspace/01-tech/database/%E6%95%B0%E6%8D%AE%E5%BA%93%E6%97%A5%E5%BF%97%E5%9F%BA%E7%A1%80/</guid>
      <description>&lt;h1 id=&#34;数据库日志基础&#34;&gt;数据库日志基础&lt;/h1&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;世上无难事，只要有日志。&lt;/p&gt;&lt;/blockquote&gt;&#xA;&lt;p&gt;本文以Mysql为例，研究支持的日志。&lt;/p&gt;&#xA;&lt;h2 id=&#34;数据库日志类型&#34;&gt;数据库日志类型&lt;/h2&gt;&#xA;&lt;p&gt;记录方式分类：&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;逻辑日志：可以简单理解为记录的就是sql语句 。&lt;/li&gt;&#xA;&lt;li&gt;物理日志：mysql 数据最终是保存在数据页中的，物理日志记录的就是数据页变更 。&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;日志类型分类：&lt;/p&gt;</description>
    </item>
    <item>
      <title>分区表</title>
      <link>http://localhost:1313/posts/workspace/01-tech/database/%E5%88%86%E5%8C%BA%E8%A1%A8/</link>
      <pubDate>Wed, 16 Nov 2022 00:00:00 +0000</pubDate>
      <guid>http://localhost:1313/posts/workspace/01-tech/database/%E5%88%86%E5%8C%BA%E8%A1%A8/</guid>
      <description>&lt;h1 id=&#34;分区表&#34;&gt;分区表&lt;/h1&gt;&#xA;&lt;h2 id=&#34;基本概念&#34;&gt;基本概念&lt;/h2&gt;&#xA;&lt;p&gt;分区、分表、分库、分片&lt;/p&gt;&#xA;&lt;p&gt;参考链接：&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://blog.csdn.net/wqaiwsj/article/details/124684356&#34;&gt;https://blog.csdn.net/wqaiwsj/article/details/124684356&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://www.cnblogs.com/qianmojie/p/16326975.html&#34;&gt;https://www.cnblogs.com/qianmojie/p/16326975.html&lt;/a&gt;&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;分区：将数据从物理上分成若干个小表存储，实际上还是一张表。为了在特定的SQL操作中&lt;strong&gt;减少数据读写的总量&lt;/strong&gt;以缩减响应时间，提升查询效率。&lt;/p&gt;</description>
    </item>
    <item>
      <title>数据库测试扫盲篇</title>
      <link>http://localhost:1313/posts/workspace/01-tech/database/%E6%95%B0%E6%8D%AE%E5%BA%93%E6%B5%8B%E8%AF%95%E6%89%AB%E7%9B%B2%E7%AF%87/</link>
      <pubDate>Wed, 31 Aug 2022 00:00:00 +0000</pubDate>
      <guid>http://localhost:1313/posts/workspace/01-tech/database/%E6%95%B0%E6%8D%AE%E5%BA%93%E6%B5%8B%E8%AF%95%E6%89%AB%E7%9B%B2%E7%AF%87/</guid>
      <description>&lt;h1 id=&#34;数据库测试扫盲篇&#34;&gt;数据库测试扫盲篇&lt;/h1&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;最近参与数据库POC测试，鉴于对数据库还不够了解，决定先以一些测试案例为蓝本，自我扫盲下。&lt;/p&gt;&lt;/blockquote&gt;&#xA;&lt;h2 id=&#34;表空间以及表空间管理&#34;&gt;表空间以及表空间管理&lt;/h2&gt;&#xA;&lt;p&gt;1、什么是表空间（TABLESPACE）&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;表空间是一种存储结构，它包含表、索引、大对象和长型数据。&lt;/p&gt;</description>
    </item>
    <item>
      <title>Linux-安装Oracle</title>
      <link>http://localhost:1313/posts/workspace/01-tech/database/oracle/linux-%E5%AE%89%E8%A3%85oracle/</link>
      <pubDate>Tue, 02 Aug 2022 00:00:00 +0000</pubDate>
      <guid>http://localhost:1313/posts/workspace/01-tech/database/oracle/linux-%E5%AE%89%E8%A3%85oracle/</guid>
      <description>&lt;h1 id=&#34;linux-安装oracle数据库&#34;&gt;Linux-安装Oracle数据库&lt;/h1&gt;&#xA;&lt;p&gt;&lt;strong&gt;安装【失败】，可能因为我的服务器空间不足。。。罢了，先放着吧&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;背景：我的阿里云linux服务器（CentOS  7.8 64位）之前在宝塔已懒人安装了mysql，现需要在服务器上学习Oracle，所以先记录安装过程（静默安装）。&lt;/p&gt;</description>
    </item>
    <item>
      <title>Oracle-实现事务提交和回滚</title>
      <link>http://localhost:1313/posts/workspace/01-tech/database/oracle/oracle-%E5%AE%9E%E7%8E%B0%E4%BA%8B%E5%8A%A1%E6%8F%90%E4%BA%A4%E5%92%8C%E5%9B%9E%E6%BB%9A/</link>
      <pubDate>Tue, 02 Aug 2022 00:00:00 +0000</pubDate>
      <guid>http://localhost:1313/posts/workspace/01-tech/database/oracle/oracle-%E5%AE%9E%E7%8E%B0%E4%BA%8B%E5%8A%A1%E6%8F%90%E4%BA%A4%E5%92%8C%E5%9B%9E%E6%BB%9A/</guid>
      <description>&lt;h1 id=&#34;oracle-实现事务提交和回滚&#34;&gt;Oracle-实现事务提交和回滚&lt;/h1&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;背景：一直以来用sqlplus /执行多条sql时，某条sql失败后无法回滚前面的sql，并会继续执行下面的sql。即，如果 sqlplus 中遇到了一个 sql 或者 pl/ssql 错误, 一般会报告这个错误然后继续处理。在交互模式下, 这种处理是很理想的, 但是如果运行的是一个脚本,我们一般不希望失败了还继续执行 。这可太不科学了！经过高人指点，可以用一条命令来实现失败回滚功能。故在此学习和记录下。&lt;/p&gt;</description>
    </item>
    <item>
      <title>ORACLE-存储过程</title>
      <link>http://localhost:1313/posts/workspace/01-tech/database/oracle/oracle-%E5%AD%98%E5%82%A8%E8%BF%87%E7%A8%8B/</link>
      <pubDate>Sun, 03 Jul 2022 00:00:00 +0000</pubDate>
      <guid>http://localhost:1313/posts/workspace/01-tech/database/oracle/oracle-%E5%AD%98%E5%82%A8%E8%BF%87%E7%A8%8B/</guid>
      <description>&lt;h1 id=&#34;oracle-存储过程&#34;&gt;ORACLE-存储过程&lt;/h1&gt;&#xA;&lt;h2 id=&#34;概念&#34;&gt;概念&lt;/h2&gt;&#xA;&lt;p&gt;存储过程(Stored Procedure)：&lt;/p&gt;&#xA;&lt;p&gt;一组为了完成某功能的一段sql语句集（一种PL/SQL块），存储在数据库中，经过第一次编译后再次调用就无需再次编译，用户通过调用指定存储过程名称和给定参数来调用。当数据库启动时,会自动加载到数据库内存中,执行效率高。&lt;/p&gt;</description>
    </item>
    <item>
      <title>ORACLE-序列</title>
      <link>http://localhost:1313/posts/workspace/01-tech/database/oracle/oracle-%E5%BA%8F%E5%88%97/</link>
      <pubDate>Mon, 13 Jun 2022 00:00:00 +0000</pubDate>
      <guid>http://localhost:1313/posts/workspace/01-tech/database/oracle/oracle-%E5%BA%8F%E5%88%97/</guid>
      <description>&lt;h1 id=&#34;oracle-序列&#34;&gt;ORACLE-序列&lt;/h1&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;背景：了解NEXTVAL的概念&lt;/p&gt;&lt;/blockquote&gt;&#xA;&lt;h2 id=&#34;oracle序列&#34;&gt;ORACLE序列&lt;/h2&gt;&#xA;&lt;h3 id=&#34;概念&#34;&gt;概念&lt;/h3&gt;&#xA;&lt;p&gt;是oacle提供的用于产生一系列唯一数字的数据库对象。&lt;strong&gt;主要用于提供主键值&lt;/strong&gt;。&lt;/p&gt;&#xA;&lt;p&gt;sequence是序列号生成器，可以为表中的行自动生成序列号，产生一组等间隔的数值(类型为数字)。**其主要的用途是生成表的主键值，可以在插入语句中引用，在插入之前，获取序列号nextval值，然后进行插入。**也可以通过查询检查当前值，或使序列增至下一个值。（https://www.jb51.net/article/220007.htm#/）&lt;/p&gt;</description>
    </item>
    <item>
      <title>SQL函数篇</title>
      <link>http://localhost:1313/posts/workspace/01-tech/database/sql%E5%87%BD%E6%95%B0%E7%AF%87/</link>
      <pubDate>Mon, 13 Jun 2022 00:00:00 +0000</pubDate>
      <guid>http://localhost:1313/posts/workspace/01-tech/database/sql%E5%87%BD%E6%95%B0%E7%AF%87/</guid>
      <description>&lt;h1 id=&#34;sql函数篇&#34;&gt;SQL函数篇&lt;/h1&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;lpad/rpad函数&lt;/li&gt;&#xA;&lt;/ul&gt;&lt;/blockquote&gt;&#xA;&lt;h2 id=&#34;lpadrpad函数&#34;&gt;lpad/rpad函数&lt;/h2&gt;&#xA;&lt;p&gt;此为Oracle函数。l/r(left/right)+pad(填充)，表示从左边/右边填充。&lt;/p&gt;&#xA;&lt;p&gt;格式：&lt;code&gt;lpad( string, padded_length, [ pad_string ] )&lt;/code&gt; （rpad同理）&lt;/p&gt;</description>
    </item>
    <item>
      <title>数据库无效对象</title>
      <link>http://localhost:1313/posts/workspace/01-tech/database/%E6%95%B0%E6%8D%AE%E5%BA%93%E6%97%A0%E6%95%88%E5%AF%B9%E8%B1%A1/</link>
      <pubDate>Sat, 14 May 2022 22:51:46 +0800</pubDate>
      <guid>http://localhost:1313/posts/workspace/01-tech/database/%E6%95%B0%E6%8D%AE%E5%BA%93%E6%97%A0%E6%95%88%E5%AF%B9%E8%B1%A1/</guid>
      <description>&lt;h1 id=&#34;数据库无效对象&#34;&gt;数据库无效对象&lt;/h1&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;背景：报“ORACLE存在无效对象，可能影响应用性能，评估是否重建对象”&lt;/p&gt;&lt;/blockquote&gt;&#xA;&lt;h2 id=&#34;概念&#34;&gt;概念&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;无效：INVALID&lt;/li&gt;&#xA;&lt;li&gt;对象：视图、物化视图、函数、包、触发器等&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;无效 PL/SQL 对象和不可用索引会对性能产生影响。无效 PL/SQL 对象必须先进行重编译，然后才能使用。这需要在执行尝试访问 PL/SQL 程序包、过程或函数的第一个操作之前花费一段编译时间。如果 PL/SQL 重编译未成功，，则操作会因发生错误而失败。优化程序会忽略不可用索引。&lt;strong&gt;如果 SQL 语句性能的好坏取决于已标记为不可用的索引，则只有重建索引才能改善性能。&lt;/strong&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>部分sql的user_io_wait_time值较大</title>
      <link>http://localhost:1313/posts/workspace/01-tech/database/%E9%83%A8%E5%88%86sql%E7%9A%84user_io_wait_time%E5%80%BC%E8%BE%83%E5%A4%A7/</link>
      <pubDate>Sat, 14 May 2022 22:51:46 +0800</pubDate>
      <guid>http://localhost:1313/posts/workspace/01-tech/database/%E9%83%A8%E5%88%86sql%E7%9A%84user_io_wait_time%E5%80%BC%E8%BE%83%E5%A4%A7/</guid>
      <description>&lt;h1 id=&#34;部分sql的user_io_wait_time值较大&#34;&gt;部分sql的user_io_wait_time值较大&lt;/h1&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;背景：报“针对近一个月的sql语句执行进行分析，每天执行较频繁的sql中，有几个sql的user_io_wait_time值较大，建议进行优化&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
