MySQL高级-SQL优化- limit优化(覆盖索引加子查询)

文章目录

  • 0、limit 优化
    • 0.1、从表 tb_sku 中按照 id 列进行排序,然后跳过前 9000000 条记录
    • 0.2、通过子查询获取按照 id 排序后的第 9000000 条开始的 10 条记录的 id 值,然后在原表中根据这些 id 值获取对应的完整记录
  • 1、上传5个sql文件到 /root
  • 2、查看文件是否上传成功
  • 3、创建表 tb_sku 结构
  • 4、执行load指令将准备好的数据,加载到表结构中
  • 5、查看 表中的数据量
  • 6、查询分页前10条记录
  • 7、使用分页查询 limit 10,10
  • 8、分页查询 从第100万开始查询10条
  • 9、分页查询 从第500万开始查询10条
  • 10、分页查询 从第900万开始查询10条

0、limit 优化

一个常见又非常头疼的问题就是 limit 2000000,10。此时需要MySQL排序前2000010记录,仅仅返回2000000-2000010的记录,其他记录丢弃,查询排序的代价非常大。
优化思路:一般分页查询时,通过创建 覆盖索引 能够比较好地提高性能,可以通过 覆盖索引 加子查询形式进行优化。

0.1、从表 tb_sku 中按照 id 列进行排序,然后跳过前 9000000 条记录

mysql> select id from tb_sku order by id limit 9000000,10;
+---------+
| id      |
+---------+
| 9000001 |
| 9000002 |
| 9000003 |
| 9000004 |
| 9000005 |
| 9000006 |
| 9000007 |
| 9000008 |
| 9000009 |
| 9000010 |
+---------+
10 rows in set (9.03 sec)

mysql> 

耗时(9.03 sec)
这种查询方式可能会非常慢,因为它需要读取并丢弃前 9,000,000 条记录才能到达你想要的起始位置

0.2、通过子查询获取按照 id 排序后的第 9000000 条开始的 10 条记录的 id 值,然后在原表中根据这些 id 值获取对应的完整记录

mysql> select s.* from tb_sku s,(select id from tb_sku order by id limit 9000000,10) a where s.id=a.id;
+---------+-----------------------+-------------------+-------+-------+-----------+----------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+--------+---------------------+---------------------+---------------+------------+---------------+----------+-------------+--------+
| id      | sn                    | name              | price | num   | alert_num | image                                                                                                                      | images                                                                                                                     | weight | create_time         | update_time         | category_name | brand_name | spec          | sale_num | comment_num | status |
+---------+-----------------------+-------------------+-------+-------+-----------+----------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+--------+---------------------+---------------------+---------------+------------+---------------+----------+-------------+--------+
| 9000001 | 100000003145009000001 | 华为Meta9000001   | 87901 |  9961 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t5590/64/5811657380/234462/5398e856/5965e173N34179777.jpg!q70.jpg.webp      | https://m.360buyimg.com/mobilecms/s720x720_jfs/t5590/64/5811657380/234462/5398e856/5965e173N34179777.jpg!q70.jpg.webp      |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 真皮包        | viney      | 白色9000001   |       39 |           0 | 1      |
| 9000002 | 100000003145009000002 | 华为Meta9000002   |     3 |  9946 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t23998/350/2363990466/222391/a6e9581d/5b7cba5bN0c18fb4f.jpg!q70.jpg.webp    | https://m.360buyimg.com/mobilecms/s720x720_jfs/t23998/350/2363990466/222391/a6e9581d/5b7cba5bN0c18fb4f.jpg!q70.jpg.webp    |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 拉拉裤        | 巴布豆     | 白色9000002   |       54 |           0 | 1      |
| 9000003 | 100000003145009000003 | 华为Meta9000003   | 78903 |  9993 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t1/25363/12/2929/274060/5c21df3aE1789bda7/030af31afd116ae0.jpg!q70.jpg.webp | https://m.360buyimg.com/mobilecms/s720x720_jfs/t1/25363/12/2929/274060/5c21df3aE1789bda7/030af31afd116ae0.jpg!q70.jpg.webp |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 拉杆箱        | 莎米特     | 白色9000003   |        7 |           0 | 1      |
| 9000004 | 100000003145009000004 | 华为Meta9000004   | 26604 | 10000 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t1/25363/12/2929/274060/5c21df3aE1789bda7/030af31afd116ae0.jpg!q70.jpg.webp | https://m.360buyimg.com/mobilecms/s720x720_jfs/t1/25363/12/2929/274060/5c21df3aE1789bda7/030af31afd116ae0.jpg!q70.jpg.webp |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 拉杆箱        | 莎米特     | 白色9000004   |        0 |           0 | 1      |
| 9000005 | 100000003145009000005 | 华为Meta9000005   | 40805 |  9996 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t22642/312/2563982615/103706/1398b13d/5b865bb3N0409f0d0.jpg!q70.jpg.webp    | https://m.360buyimg.com/mobilecms/s720x720_jfs/t22642/312/2563982615/103706/1398b13d/5b865bb3N0409f0d0.jpg!q70.jpg.webp    |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 手机          | 华为       | 白色9000005   |        4 |           0 | 1      |
| 9000006 | 100000003145009000006 | 华为Meta9000006   | 89206 |  9930 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t22642/312/2563982615/103706/1398b13d/5b865bb3N0409f0d0.jpg!q70.jpg.webp    | https://m.360buyimg.com/mobilecms/s720x720_jfs/t22642/312/2563982615/103706/1398b13d/5b865bb3N0409f0d0.jpg!q70.jpg.webp    |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 手机          | 华为       | 白色9000006   |       70 |           0 | 1      |
| 9000007 | 100000003145009000007 | 华为Meta9000007   | 11707 |     4 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t20707/78/2349564629/130172/50a245d8/5b8e00e2Nf0bcd624.jpg!q70.jpg.webp     | https://m.360buyimg.com/mobilecms/s720x720_jfs/t20707/78/2349564629/130172/50a245d8/5b8e00e2Nf0bcd624.jpg!q70.jpg.webp     |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 手机          | vivo       | 白色9000007   |        1 |           0 | 1      |
| 9000008 | 100000003145009000008 | 华为Meta9000008   | 99808 |  9994 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t26281/196/340140952/94362/c353173/5b8f6e63N56334c08.jpg!q70.jpg.webp       | https://m.360buyimg.com/mobilecms/s720x720_jfs/t26281/196/340140952/94362/c353173/5b8f6e63N56334c08.jpg!q70.jpg.webp       |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 老花镜        | 夕阳红     | 白色9000008   |        6 |           0 | 1      |
| 9000009 | 100000003145009000009 | 华为Meta9000009   | 41709 | 10000 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t26281/196/340140952/94362/c353173/5b8f6e63N56334c08.jpg!q70.jpg.webp       | https://m.360buyimg.com/mobilecms/s720x720_jfs/t26281/196/340140952/94362/c353173/5b8f6e63N56334c08.jpg!q70.jpg.webp       |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 老花镜        | 夕阳红     | 白色9000009   |        0 |           0 | 1      |
| 9000010 | 100000003145009000010 | 华为Meta9000010   | 23710 | 10000 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t26281/196/340140952/94362/c353173/5b8f6e63N56334c08.jpg!q70.jpg.webp       | https://m.360buyimg.com/mobilecms/s720x720_jfs/t26281/196/340140952/94362/c353173/5b8f6e63N56334c08.jpg!q70.jpg.webp       |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 老花镜        | 夕阳红     | 白色9000010   |        0 |           0 | 1      |
+---------+-----------------------+-------------------+-------+-------+-----------+----------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+--------+---------------------+---------------------+---------------+------------+---------------+----------+-------------+--------+
10 rows in set (9.44 sec)

mysql> 

耗时(9.44 sec)

1、上传5个sql文件到 /root

在这里插入图片描述

注意 : 由于1000w的数据量较大 , 如果直接加载1000w , 会非常耗费CPU及内存 ; 已经拆分为5个部分 , 每一个部分为200w数据 , load 5次即可 ;

2、查看文件是否上传成功

[root@localhost ~]# ll
总用量 3653220
-rw-------. 1 root root      1533 124 2023 anaconda-ks.cfg
-rw-r--r--. 1 root root       191 625 13:29 dump6379.rdb
-rw-r--r--. 1 root root       191 625 13:31 dump6380.rdb
-rw-r--r--. 1 root root       191 625 13:32 dump6381.rdb
-rw-r--r--. 1 root root       583 624 11:13 dump.rdb
-rw-r--r--. 1 root root      1564 124 2023 initial-setup-ks.cfg
-rw-r--r--. 1 root root  57650380 222 2022 load_user_100w_sort.sql
drwxr-xr-x. 3 root root        18 18 18:11 minio
-rw-r--r--. 1 root root       141 625 17:00 nodes-6379.conf
-rw-------. 1 root root    178567 63 13:50 nohup.out
-rw-r--r--. 1 root root 733017638 222 2022 tb_sku1.sql
-rw-r--r--. 1 root root 737475921 628 19:39 tb_sku2.sql
-rw-r--r--. 1 root root 737504035 222 2022 tb_sku3.sql
-rw-r--r--. 1 root root 737525348 628 19:40 tb_sku4.sql
-rw-r--r--. 1 root root 737508325 222 2022 tb_sku5.sql
drwxr-xr-x. 2 root root         6 124 2023 公共
drwxr-xr-x. 2 root root         6 124 2023 模板
drwxr-xr-x. 2 root root         6 124 2023 视频
drwxr-xr-x. 2 root root         6 124 2023 图片
drwxr-xr-x. 2 root root         6 124 2023 文档
drwxr-xr-x. 2 root root         6 124 2023 下载
drwxr-xr-x. 2 root root         6 124 2023 音乐
drwxr-xr-x. 2 root root         6 124 2023 桌面
[root@localhost ~]# 

3、创建表 tb_sku 结构

mysql> CREATE TABLE `tb_sku` (
    ->   `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '商品id',
    ->   `sn` varchar(100) NOT NULL COMMENT '商品条码',
    ->   `name` varchar(200) NOT NULL COMMENT 'SKU名称',
    ->   `price` int(20) NOT NULL COMMENT '价格(分)',
    ->   `num` int(10) NOT NULL COMMENT '库存数量',
    ->   `alert_num` int(11) DEFAULT NULL COMMENT '库存预警数量',
    ->   `image` varchar(200) DEFAULT NULL COMMENT '商品图片',
    ->   `images` varchar(2000) DEFAULT NULL COMMENT '商品图片列表',
    ->   `weight` int(11) DEFAULT NULL COMMENT '重量(克)',
    ->   `create_time` datetime DEFAULT NULL COMMENT '创建时间',
    ->   `update_time` datetime DEFAULT NULL COMMENT '更新时间',
    ->   `category_name` varchar(200) DEFAULT NULL COMMENT '类目名称',
    ->   `brand_name` varchar(100) DEFAULT NULL COMMENT '品牌名称',
    ->   `spec` varchar(200) DEFAULT NULL COMMENT '规格',
    ->   `sale_num` int(11) DEFAULT '0' COMMENT '销量',
    ->   `comment_num` int(11) DEFAULT '0' COMMENT '评论数',
    ->   `status` char(1) DEFAULT '1' COMMENT '商品状态 1-正常,2-下架,3-删除',
    ->   PRIMARY KEY (`id`) USING BTREE
    -> ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='商品表';
Query OK, 0 rows affected, 7 warnings (0.32 sec)

mysql> show tables;
+-------------------+
| Tables_in_atguigu |
+-------------------+
| tb_sku            |
| tb_user           |
+-------------------+
2 rows in set (0.00 sec)

mysql> 

4、执行load指令将准备好的数据,加载到表结构中

mysql> load data local infile '/root/tb_sku1.sql' into table `tb_sku` fields terminated by ',' lines terminated by '\n';
Query OK, 2000000 rows affected, 1610 warnings (46.10 sec)
Records: 2000000  Deleted: 0  Skipped: 0  Warnings: 1610

mysql> load data local infile '/root/tb_sku2.sql' into table `tb_sku` fields terminated by ',' lines terminated by '\n';
Query OK, 2000000 rows affected, 1540 warnings (42.06 sec)
Records: 2000000  Deleted: 0  Skipped: 0  Warnings: 1540

mysql> load data local infile '/root/tb_sku3.sql' into table `tb_sku` fields terminated by ',' lines terminated by '\n';
Query OK, 2000000 rows affected, 1540 warnings (46.09 sec)
Records: 2000000  Deleted: 0  Skipped: 0  Warnings: 1540

mysql> load data local infile '/root/tb_sku4.sql' into table `tb_sku` fields terminated by ',' lines terminated by '\n';
Query OK, 2000000 rows affected, 1540 warnings (41.28 sec)
Records: 2000000  Deleted: 0  Skipped: 0  Warnings: 1540

mysql> load data local infile '/root/tb_sku5.sql' into table `tb_sku` fields terminated by ',' lines terminated by '\n';
Query OK, 2000000 rows affected, 1546 warnings (41.12 sec)
Records: 2000000  Deleted: 0  Skipped: 0  Warnings: 1546

mysql> 

5、查看 表中的数据量

mysql> select count(*) from tb_sku;
+----------+
| count(*) |
+----------+
| 10000000 |
+----------+
1 row in set (12.80 sec)

mysql> 

6、查询分页前10条记录

mysql> select * from tb_sku limit 0,10;
+----+------------------+--------------+-------+-------+-----------+----------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+--------+---------------------+---------------------+---------------+------------+----------+----------+-------------+--------+
| id | sn               | name         | price | num   | alert_num | image                                                                                                                      | images                                                                                                                     | weight | create_time         | update_time         | category_name | brand_name | spec     | sale_num | comment_num | status |
+----+------------------+--------------+-------+-------+-----------+----------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+--------+---------------------+---------------------+---------------+------------+----------+----------+-------------+--------+
|  1 | 100000003145001  | 华为Meta1    | 87901 |  9961 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t5590/64/5811657380/234462/5398e856/5965e173N34179777.jpg!q70.jpg.webp      | https://m.360buyimg.com/mobilecms/s720x720_jfs/t5590/64/5811657380/234462/5398e856/5965e173N34179777.jpg!q70.jpg.webp      |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 真皮包        | viney      | 白色1    |       39 |           0 | 1      |
|  2 | 100000003145002  | 华为Meta2    |     3 |  9946 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t23998/350/2363990466/222391/a6e9581d/5b7cba5bN0c18fb4f.jpg!q70.jpg.webp    | https://m.360buyimg.com/mobilecms/s720x720_jfs/t23998/350/2363990466/222391/a6e9581d/5b7cba5bN0c18fb4f.jpg!q70.jpg.webp    |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 拉拉裤        | 巴布豆     | 白色2    |       54 |           0 | 1      |
|  3 | 100000003145003  | 华为Meta3    | 78903 |  9993 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t1/25363/12/2929/274060/5c21df3aE1789bda7/030af31afd116ae0.jpg!q70.jpg.webp | https://m.360buyimg.com/mobilecms/s720x720_jfs/t1/25363/12/2929/274060/5c21df3aE1789bda7/030af31afd116ae0.jpg!q70.jpg.webp |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 拉杆箱        | 莎米特     | 白色3    |        7 |           0 | 1      |
|  4 | 100000003145004  | 华为Meta4    | 26604 | 10000 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t1/25363/12/2929/274060/5c21df3aE1789bda7/030af31afd116ae0.jpg!q70.jpg.webp | https://m.360buyimg.com/mobilecms/s720x720_jfs/t1/25363/12/2929/274060/5c21df3aE1789bda7/030af31afd116ae0.jpg!q70.jpg.webp |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 拉杆箱        | 莎米特     | 白色4    |        0 |           0 | 1      |
|  5 | 100000003145005  | 华为Meta5    | 40805 |  9996 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t22642/312/2563982615/103706/1398b13d/5b865bb3N0409f0d0.jpg!q70.jpg.webp    | https://m.360buyimg.com/mobilecms/s720x720_jfs/t22642/312/2563982615/103706/1398b13d/5b865bb3N0409f0d0.jpg!q70.jpg.webp    |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 手机          | 华为       | 白色5    |        4 |           0 | 1      |
|  6 | 100000003145006  | 华为Meta6    | 89206 |  9930 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t22642/312/2563982615/103706/1398b13d/5b865bb3N0409f0d0.jpg!q70.jpg.webp    | https://m.360buyimg.com/mobilecms/s720x720_jfs/t22642/312/2563982615/103706/1398b13d/5b865bb3N0409f0d0.jpg!q70.jpg.webp    |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 手机          | 华为       | 白色6    |       70 |           0 | 1      |
|  7 | 100000003145007  | 华为Meta7    | 11707 |     4 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t20707/78/2349564629/130172/50a245d8/5b8e00e2Nf0bcd624.jpg!q70.jpg.webp     | https://m.360buyimg.com/mobilecms/s720x720_jfs/t20707/78/2349564629/130172/50a245d8/5b8e00e2Nf0bcd624.jpg!q70.jpg.webp     |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 手机          | vivo       | 白色7    |        1 |           0 | 1      |
|  8 | 100000003145008  | 华为Meta8    | 99808 |  9994 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t26281/196/340140952/94362/c353173/5b8f6e63N56334c08.jpg!q70.jpg.webp       | https://m.360buyimg.com/mobilecms/s720x720_jfs/t26281/196/340140952/94362/c353173/5b8f6e63N56334c08.jpg!q70.jpg.webp       |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 老花镜        | 夕阳红     | 白色8    |        6 |           0 | 1      |
|  9 | 100000003145009  | 华为Meta9    | 41709 | 10000 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t26281/196/340140952/94362/c353173/5b8f6e63N56334c08.jpg!q70.jpg.webp       | https://m.360buyimg.com/mobilecms/s720x720_jfs/t26281/196/340140952/94362/c353173/5b8f6e63N56334c08.jpg!q70.jpg.webp       |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 老花镜        | 夕阳红     | 白色9    |        0 |           0 | 1      |
| 10 | 1000000031450010 | 华为Meta10   | 23710 | 10000 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t26281/196/340140952/94362/c353173/5b8f6e63N56334c08.jpg!q70.jpg.webp       | https://m.360buyimg.com/mobilecms/s720x720_jfs/t26281/196/340140952/94362/c353173/5b8f6e63N56334c08.jpg!q70.jpg.webp       |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 老花镜        | 夕阳红     | 白色10   |        0 |           0 | 1      |
+----+------------------+--------------+-------+-------+-----------+----------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+--------+---------------------+---------------------+---------------+------------+----------+----------+-------------+--------+
10 rows in set (0.01 sec)

mysql> 

耗时(0.01 sec)

7、使用分页查询 limit 10,10

mysql> select * from tb_sku limit 10,10;
+----+------------------+--------------+-------+-------+-----------+--------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+--------+---------------------+---------------------+---------------+-------------------------+----------+----------+-------------+--------+
| id | sn               | name         | price | num   | alert_num | image                                                                                                                    | images                                                                                                                   | weight | create_time         | update_time         | category_name | brand_name              | spec     | sale_num | comment_num | status |
+----+------------------+--------------+-------+-------+-----------+--------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+--------+---------------------+---------------------+---------------+-------------------------+----------+----------+-------------+--------+
| 11 | 1000000031450011 | 华为Meta11   | 86111 | 10000 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t26281/196/340140952/94362/c353173/5b8f6e63N56334c08.jpg!q70.jpg.webp     | https://m.360buyimg.com/mobilecms/s720x720_jfs/t26281/196/340140952/94362/c353173/5b8f6e63N56334c08.jpg!q70.jpg.webp     |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 老花镜        | 夕阳红                  | 白色11   |        0 |           0 | 1      |
| 12 | 1000000031450012 | 华为Meta12   | 11312 |  9999 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t25867/102/1274759920/233086/96f7fc46/5b909851N02396afd.jpg!q70.jpg.webp  | https://m.360buyimg.com/mobilecms/s720x720_jfs/t25867/102/1274759920/233086/96f7fc46/5b909851N02396afd.jpg!q70.jpg.webp  |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 老花镜        | ARNO FOCUS ON YOUR EYES | 白色12   |        1 |           0 | 1      |
| 13 | 1000000031450013 | 华为Meta13   | 99013 | 10000 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t25867/102/1274759920/233086/96f7fc46/5b909851N02396afd.jpg!q70.jpg.webp  | https://m.360buyimg.com/mobilecms/s720x720_jfs/t25867/102/1274759920/233086/96f7fc46/5b909851N02396afd.jpg!q70.jpg.webp  |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 老花镜        | ARNO FOCUS ON YOUR EYES | 白色13   |        0 |           0 | 1      |
| 14 | 1000000031450014 | 华为Meta14   | 75314 | 10000 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t1/4364/38/240/219619/5b909979E13d29469/7c908af4d61cf659.jpg!q70.jpg.webp | https://m.360buyimg.com/mobilecms/s720x720_jfs/t1/4364/38/240/219619/5b909979E13d29469/7c908af4d61cf659.jpg!q70.jpg.webp |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 老花镜        | ARNO FOCUS ON YOUR EYES | 白色14   |        0 |           0 | 1      |
| 15 | 1000000031450015 | 华为Meta15   | 69915 | 10000 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t25867/102/1274759920/233086/96f7fc46/5b909851N02396afd.jpg!q70.jpg.webp  | https://m.360buyimg.com/mobilecms/s720x720_jfs/t25867/102/1274759920/233086/96f7fc46/5b909851N02396afd.jpg!q70.jpg.webp  |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 老花镜        | ARNO FOCUS ON YOUR EYES | 白色15   |        0 |           0 | 1      |
| 16 | 1000000031450016 | 华为Meta16   |  5916 |  9997 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t25867/102/1274759920/233086/96f7fc46/5b909851N02396afd.jpg!q70.jpg.webp  | https://m.360buyimg.com/mobilecms/s720x720_jfs/t25867/102/1274759920/233086/96f7fc46/5b909851N02396afd.jpg!q70.jpg.webp  |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 老花镜        | ARNO FOCUS ON YOUR EYES | 白色16   |        3 |           0 | 1      |
| 17 | 1000000031450017 | 华为Meta17   | 30517 |  9960 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t25957/363/1290162041/159777/41fe0e72/5b908f41N4884b765.jpg!q70.jpg.webp  | https://m.360buyimg.com/mobilecms/s720x720_jfs/t25957/363/1290162041/159777/41fe0e72/5b908f41N4884b765.jpg!q70.jpg.webp  |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 老花镜        | ARNO FOCUS ON YOUR EYES | 白色17   |       40 |           0 | 1      |
| 18 | 1000000031450018 | 华为Meta18   | 63818 | 10000 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t1/4364/38/240/219619/5b909979E13d29469/7c908af4d61cf659.jpg!q70.jpg.webp | https://m.360buyimg.com/mobilecms/s720x720_jfs/t1/4364/38/240/219619/5b909979E13d29469/7c908af4d61cf659.jpg!q70.jpg.webp |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 老花镜        | ARNO FOCUS ON YOUR EYES | 白色18   |        0 |           0 | 1      |
| 19 | 1000000031450019 | 华为Meta19   |    20 |  9995 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t25957/363/1290162041/159777/41fe0e72/5b908f41N4884b765.jpg!q70.jpg.webp  | https://m.360buyimg.com/mobilecms/s720x720_jfs/t25957/363/1290162041/159777/41fe0e72/5b908f41N4884b765.jpg!q70.jpg.webp  |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 老花镜        | ARNO FOCUS ON YOUR EYES | 白色19   |        5 |           0 | 1      |
| 20 | 1000000031450020 | 华为Meta20   | 94020 | 10000 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t1/3876/25/222/165387/5b908202E95fa6558/6b8fd41266c11cd5.jpg!q70.jpg.webp | https://m.360buyimg.com/mobilecms/s720x720_jfs/t1/3876/25/222/165387/5b908202E95fa6558/6b8fd41266c11cd5.jpg!q70.jpg.webp |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 老花镜        | ARNO FOCUS ON YOUR EYES | 白色20   |        0 |           0 | 1      |
+----+------------------+--------------+-------+-------+-----------+--------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+--------+---------------------+---------------------+---------------+-------------------------+----------+----------+-------------+--------+
10 rows in set (0.00 sec)

mysql> 

耗时(0.00 sec)

8、分页查询 从第100万开始查询10条

mysql> select * from tb_sku limit 1000000,10;
+---------+-----------------------+-------------------+--------+-------+-----------+-------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------+--------+---------------------+---------------------+---------------+------------+---------------+----------+-------------+--------+
| id      | sn                    | name              | price  | num   | alert_num | image                                                                                                                   | images                                                                                                                  | weight | create_time         | update_time         | category_name | brand_name | spec          | sale_num | comment_num | status |
+---------+-----------------------+-------------------+--------+-------+-----------+-------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------+--------+---------------------+---------------------+---------------+------------+---------------+----------+-------------+--------+
| 1000001 | 100000003145001000001 | 华为Meta1000001   |  92001 | 10000 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t18196/293/2136823958/421330/7e75be4b/5ae83333Nae68e60d.jpg!q70.jpg.webp | https://m.360buyimg.com/mobilecms/s720x720_jfs/t18196/293/2136823958/421330/7e75be4b/5ae83333Nae68e60d.jpg!q70.jpg.webp |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 老花镜        | 又一春     | 白色1000001   |        0 |           0 | 1      |
| 1000002 | 100000003145001000002 | 华为Meta1000002   |  52002 | 10000 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t18196/293/2136823958/421330/7e75be4b/5ae83333Nae68e60d.jpg!q70.jpg.webp | https://m.360buyimg.com/mobilecms/s720x720_jfs/t18196/293/2136823958/421330/7e75be4b/5ae83333Nae68e60d.jpg!q70.jpg.webp |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 老花镜        | 又一春     | 白色1000002   |        0 |           0 | 1      |
| 1000003 | 100000003145001000003 | 华为Meta1000003   |  70003 | 10000 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t18196/293/2136823958/421330/7e75be4b/5ae83333Nae68e60d.jpg!q70.jpg.webp | https://m.360buyimg.com/mobilecms/s720x720_jfs/t18196/293/2136823958/421330/7e75be4b/5ae83333Nae68e60d.jpg!q70.jpg.webp |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 老花镜        | 又一春     | 白色1000003   |        0 |           0 | 1      |
| 1000004 | 100000003145001000004 | 华为Meta1000004   |  93904 | 10000 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t6547/152/1052579367/121386/23997aff/5949c409N0240aa60.jpg!q70.jpg.webp  | https://m.360buyimg.com/mobilecms/s720x720_jfs/t6547/152/1052579367/121386/23997aff/5949c409N0240aa60.jpg!q70.jpg.webp  |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 休闲鞋        | 回力       | 白色1000004   |        0 |           0 | 1      |
| 1000005 | 100000003145001000005 | 华为Meta1000005   |  34805 | 10000 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t6547/152/1052579367/121386/23997aff/5949c409N0240aa60.jpg!q70.jpg.webp  | https://m.360buyimg.com/mobilecms/s720x720_jfs/t6547/152/1052579367/121386/23997aff/5949c409N0240aa60.jpg!q70.jpg.webp  |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 休闲鞋        | 回力       | 白色1000005   |        0 |           0 | 1      |
| 1000006 | 100000003145001000006 | 华为Meta1000006   |  57606 | 10000 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t6547/152/1052579367/121386/23997aff/5949c409N0240aa60.jpg!q70.jpg.webp  | https://m.360buyimg.com/mobilecms/s720x720_jfs/t6547/152/1052579367/121386/23997aff/5949c409N0240aa60.jpg!q70.jpg.webp  |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 休闲鞋        | 回力       | 白色1000006   |        0 |           0 | 1      |
| 1000007 | 100000003145001000007 | 华为Meta1000007   |  76307 | 10000 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t6547/152/1052579367/121386/23997aff/5949c409N0240aa60.jpg!q70.jpg.webp  | https://m.360buyimg.com/mobilecms/s720x720_jfs/t6547/152/1052579367/121386/23997aff/5949c409N0240aa60.jpg!q70.jpg.webp  |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 休闲鞋        | 回力       | 白色1000007   |        0 |           0 | 1      |
| 1000008 | 100000003145001000008 | 华为Meta1000008   | 101008 | 10000 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t6547/152/1052579367/121386/23997aff/5949c409N0240aa60.jpg!q70.jpg.webp  | https://m.360buyimg.com/mobilecms/s720x720_jfs/t6547/152/1052579367/121386/23997aff/5949c409N0240aa60.jpg!q70.jpg.webp  |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 休闲鞋        | 回力       | 白色1000008   |        0 |           0 | 1      |
| 1000009 | 100000003145001000009 | 华为Meta1000009   |  16609 | 10000 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t6547/152/1052579367/121386/23997aff/5949c409N0240aa60.jpg!q70.jpg.webp  | https://m.360buyimg.com/mobilecms/s720x720_jfs/t6547/152/1052579367/121386/23997aff/5949c409N0240aa60.jpg!q70.jpg.webp  |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 休闲鞋        | 回力       | 白色1000009   |        0 |           0 | 1      |
| 1000010 | 100000003145001000010 | 华为Meta1000010   |  20610 | 10000 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t6547/152/1052579367/121386/23997aff/5949c409N0240aa60.jpg!q70.jpg.webp  | https://m.360buyimg.com/mobilecms/s720x720_jfs/t6547/152/1052579367/121386/23997aff/5949c409N0240aa60.jpg!q70.jpg.webp  |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 休闲鞋        | 回力       | 白色1000010   |        0 |           0 | 1      |
+---------+-----------------------+-------------------+--------+-------+-----------+-------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------+--------+---------------------+---------------------+---------------+------------+---------------+----------+-------------+--------+
10 rows in set (2.01 sec)

mysql> 

耗时(2.01 sec)

9、分页查询 从第500万开始查询10条

mysql> select * from tb_sku limit 5000000,10;
+---------+-----------------------+-------------------+--------+-------+-----------+------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+--------+---------------------+---------------------+---------------+------------+---------------+----------+-------------+--------+
| id      | sn                    | name              | price  | num   | alert_num | image                                                                                                                  | images                                                                                                                 | weight | create_time         | update_time         | category_name | brand_name | spec          | sale_num | comment_num | status |
+---------+-----------------------+-------------------+--------+-------+-----------+------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+--------+---------------------+---------------------+---------------+------------+---------------+----------+-------------+--------+
| 5000001 | 100000003145005000001 | 华为Meta5000001   |  83301 | 10000 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t23416/164/1114672941/97718/7a52de73/5b51a552Na67d01ef.jpg!q70.jpg.webp | https://m.360buyimg.com/mobilecms/s720x720_jfs/t23416/164/1114672941/97718/7a52de73/5b51a552Na67d01ef.jpg!q70.jpg.webp |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 休闲鞋        | 森马       | 白色5000001   |        0 |           0 | 1      |
| 5000002 | 100000003145005000002 | 华为Meta5000002   | 127202 | 10000 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t23416/164/1114672941/97718/7a52de73/5b51a552Na67d01ef.jpg!q70.jpg.webp | https://m.360buyimg.com/mobilecms/s720x720_jfs/t23416/164/1114672941/97718/7a52de73/5b51a552Na67d01ef.jpg!q70.jpg.webp |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 休闲鞋        | 森马       | 白色5000002   |        0 |           0 | 1      |
| 5000003 | 100000003145005000003 | 华为Meta5000003   | 145403 | 10000 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t23416/164/1114672941/97718/7a52de73/5b51a552Na67d01ef.jpg!q70.jpg.webp | https://m.360buyimg.com/mobilecms/s720x720_jfs/t23416/164/1114672941/97718/7a52de73/5b51a552Na67d01ef.jpg!q70.jpg.webp |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 休闲鞋        | 森马       | 白色5000003   |        0 |           0 | 1      |
| 5000004 | 100000003145005000004 | 华为Meta5000004   | 127004 | 10000 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t23416/164/1114672941/97718/7a52de73/5b51a552Na67d01ef.jpg!q70.jpg.webp | https://m.360buyimg.com/mobilecms/s720x720_jfs/t23416/164/1114672941/97718/7a52de73/5b51a552Na67d01ef.jpg!q70.jpg.webp |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 休闲鞋        | 森马       | 白色5000004   |        0 |           0 | 1      |
| 5000005 | 100000003145005000005 | 华为Meta5000005   |  95805 | 10000 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t23416/164/1114672941/97718/7a52de73/5b51a552Na67d01ef.jpg!q70.jpg.webp | https://m.360buyimg.com/mobilecms/s720x720_jfs/t23416/164/1114672941/97718/7a52de73/5b51a552Na67d01ef.jpg!q70.jpg.webp |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 休闲鞋        | 森马       | 白色5000005   |        0 |           0 | 1      |
| 5000006 | 100000003145005000006 | 华为Meta5000006   | 105306 | 10000 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t23416/164/1114672941/97718/7a52de73/5b51a552Na67d01ef.jpg!q70.jpg.webp | https://m.360buyimg.com/mobilecms/s720x720_jfs/t23416/164/1114672941/97718/7a52de73/5b51a552Na67d01ef.jpg!q70.jpg.webp |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 休闲鞋        | 森马       | 白色5000006   |        0 |           0 | 1      |
| 5000007 | 100000003145005000007 | 华为Meta5000007   |  81707 | 10000 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t23416/164/1114672941/97718/7a52de73/5b51a552Na67d01ef.jpg!q70.jpg.webp | https://m.360buyimg.com/mobilecms/s720x720_jfs/t23416/164/1114672941/97718/7a52de73/5b51a552Na67d01ef.jpg!q70.jpg.webp |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 休闲鞋        | 森马       | 白色5000007   |        0 |           0 | 1      |
| 5000008 | 100000003145005000008 | 华为Meta5000008   | 140008 | 10000 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t23416/164/1114672941/97718/7a52de73/5b51a552Na67d01ef.jpg!q70.jpg.webp | https://m.360buyimg.com/mobilecms/s720x720_jfs/t23416/164/1114672941/97718/7a52de73/5b51a552Na67d01ef.jpg!q70.jpg.webp |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 休闲鞋        | 森马       | 白色5000008   |        0 |           0 | 1      |
| 5000009 | 100000003145005000009 | 华为Meta5000009   | 134109 | 10000 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t23416/164/1114672941/97718/7a52de73/5b51a552Na67d01ef.jpg!q70.jpg.webp | https://m.360buyimg.com/mobilecms/s720x720_jfs/t23416/164/1114672941/97718/7a52de73/5b51a552Na67d01ef.jpg!q70.jpg.webp |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 休闲鞋        | 森马       | 白色5000009   |        0 |           0 | 1      |
| 5000010 | 100000003145005000010 | 华为Meta5000010   |  98210 | 10000 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t22147/88/2343365802/108958/ebe4bd23/5b51adb8N9bcfa164.jpg!q70.jpg.webp | https://m.360buyimg.com/mobilecms/s720x720_jfs/t22147/88/2343365802/108958/ebe4bd23/5b51adb8N9bcfa164.jpg!q70.jpg.webp |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 休闲鞋        | 森马       | 白色5000010   |        0 |           0 | 1      |
+---------+-----------------------+-------------------+--------+-------+-----------+------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+--------+---------------------+---------------------+---------------+------------+---------------+----------+-------------+--------+
10 rows in set (7.68 sec)

mysql> 

耗时(7.68 sec)

10、分页查询 从第900万开始查询10条

mysql> select * from tb_sku limit 9000000,10;
+---------+-----------------------+-------------------+-------+-------+-----------+----------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+--------+---------------------+---------------------+---------------+------------+---------------+----------+-------------+--------+
| id      | sn                    | name              | price | num   | alert_num | image                                                                                                                      | images                                                                                                                     | weight | create_time         | update_time         | category_name | brand_name | spec          | sale_num | comment_num | status |
+---------+-----------------------+-------------------+-------+-------+-----------+----------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+--------+---------------------+---------------------+---------------+------------+---------------+----------+-------------+--------+
| 9000001 | 100000003145009000001 | 华为Meta9000001   | 87901 |  9961 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t5590/64/5811657380/234462/5398e856/5965e173N34179777.jpg!q70.jpg.webp      | https://m.360buyimg.com/mobilecms/s720x720_jfs/t5590/64/5811657380/234462/5398e856/5965e173N34179777.jpg!q70.jpg.webp      |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 真皮包        | viney      | 白色9000001   |       39 |           0 | 1      |
| 9000002 | 100000003145009000002 | 华为Meta9000002   |     3 |  9946 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t23998/350/2363990466/222391/a6e9581d/5b7cba5bN0c18fb4f.jpg!q70.jpg.webp    | https://m.360buyimg.com/mobilecms/s720x720_jfs/t23998/350/2363990466/222391/a6e9581d/5b7cba5bN0c18fb4f.jpg!q70.jpg.webp    |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 拉拉裤        | 巴布豆     | 白色9000002   |       54 |           0 | 1      |
| 9000003 | 100000003145009000003 | 华为Meta9000003   | 78903 |  9993 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t1/25363/12/2929/274060/5c21df3aE1789bda7/030af31afd116ae0.jpg!q70.jpg.webp | https://m.360buyimg.com/mobilecms/s720x720_jfs/t1/25363/12/2929/274060/5c21df3aE1789bda7/030af31afd116ae0.jpg!q70.jpg.webp |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 拉杆箱        | 莎米特     | 白色9000003   |        7 |           0 | 1      |
| 9000004 | 100000003145009000004 | 华为Meta9000004   | 26604 | 10000 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t1/25363/12/2929/274060/5c21df3aE1789bda7/030af31afd116ae0.jpg!q70.jpg.webp | https://m.360buyimg.com/mobilecms/s720x720_jfs/t1/25363/12/2929/274060/5c21df3aE1789bda7/030af31afd116ae0.jpg!q70.jpg.webp |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 拉杆箱        | 莎米特     | 白色9000004   |        0 |           0 | 1      |
| 9000005 | 100000003145009000005 | 华为Meta9000005   | 40805 |  9996 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t22642/312/2563982615/103706/1398b13d/5b865bb3N0409f0d0.jpg!q70.jpg.webp    | https://m.360buyimg.com/mobilecms/s720x720_jfs/t22642/312/2563982615/103706/1398b13d/5b865bb3N0409f0d0.jpg!q70.jpg.webp    |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 手机          | 华为       | 白色9000005   |        4 |           0 | 1      |
| 9000006 | 100000003145009000006 | 华为Meta9000006   | 89206 |  9930 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t22642/312/2563982615/103706/1398b13d/5b865bb3N0409f0d0.jpg!q70.jpg.webp    | https://m.360buyimg.com/mobilecms/s720x720_jfs/t22642/312/2563982615/103706/1398b13d/5b865bb3N0409f0d0.jpg!q70.jpg.webp    |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 手机          | 华为       | 白色9000006   |       70 |           0 | 1      |
| 9000007 | 100000003145009000007 | 华为Meta9000007   | 11707 |     4 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t20707/78/2349564629/130172/50a245d8/5b8e00e2Nf0bcd624.jpg!q70.jpg.webp     | https://m.360buyimg.com/mobilecms/s720x720_jfs/t20707/78/2349564629/130172/50a245d8/5b8e00e2Nf0bcd624.jpg!q70.jpg.webp     |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 手机          | vivo       | 白色9000007   |        1 |           0 | 1      |
| 9000008 | 100000003145009000008 | 华为Meta9000008   | 99808 |  9994 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t26281/196/340140952/94362/c353173/5b8f6e63N56334c08.jpg!q70.jpg.webp       | https://m.360buyimg.com/mobilecms/s720x720_jfs/t26281/196/340140952/94362/c353173/5b8f6e63N56334c08.jpg!q70.jpg.webp       |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 老花镜        | 夕阳红     | 白色9000008   |        6 |           0 | 1      |
| 9000009 | 100000003145009000009 | 华为Meta9000009   | 41709 | 10000 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t26281/196/340140952/94362/c353173/5b8f6e63N56334c08.jpg!q70.jpg.webp       | https://m.360buyimg.com/mobilecms/s720x720_jfs/t26281/196/340140952/94362/c353173/5b8f6e63N56334c08.jpg!q70.jpg.webp       |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 老花镜        | 夕阳红     | 白色9000009   |        0 |           0 | 1      |
| 9000010 | 100000003145009000010 | 华为Meta9000010   | 23710 | 10000 |       100 | https://m.360buyimg.com/mobilecms/s720x720_jfs/t26281/196/340140952/94362/c353173/5b8f6e63N56334c08.jpg!q70.jpg.webp       | https://m.360buyimg.com/mobilecms/s720x720_jfs/t26281/196/340140952/94362/c353173/5b8f6e63N56334c08.jpg!q70.jpg.webp       |     10 | 2019-05-01 00:00:00 | 2019-05-01 00:00:00 | 老花镜        | 夕阳红     | 白色9000010   |        0 |           0 | 1      |
+---------+-----------------------+-------------------+-------+-------+-----------+----------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+--------+---------------------+---------------------+---------------+------------+---------------+----------+-------------+--------+
10 rows in set (14.51 sec)

mysql> 

耗时(14.51 sec)

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:/a/753747.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

AI与学术的交响:ChatGPT辅助下的实验设计新篇章

学境思源,一键生成论文初稿: AcademicIdeas - 学境思源AI论文写作 在学术研究中,实验设计是确保研究质量和结果可信度的关键环节。这篇文章我们将为大家介绍如何利用ChatGPT辅助完成学术论文的实验设计,通过提供灵感、优化实验步…

有什么好用的ai自动绘画软件?6个软件帮助你快速进行智能绘画

有什么好用的ai自动绘画软件?6个软件帮助你快速进行智能绘画 寻找好用的AI自动绘画软件可以帮助用户快速进行智能绘画,以下是几款推荐的软件,它们能够提供不同风格和功能的绘画体验: 聪明灵犀:这是一款知名的AI艺术应…

【pytorch10】统计属性

常见统计属性 norm(范数)mean,sumprodmax,min,argmin,argmaxkthvalue,topk kthvalue求第几个的位置和第几个的值 topk求top几的这样的一个数值 norm范数 这里的norm表达的是范数的意思,norma…

多地高温持续“热力”爆表 约克VRF中央空调带你清凉舒爽一夏

“出门5分钟,流汗2小时”,夏季高温天气,怎一个“热”字了得?6月以来,我国多地迎来高温“炙烤”,全国出现40℃以上高温的范围持续增加,随着中央气象台高温预警持续拉响,人们都很纳闷:…

主流电商平台API接口(天猫获得淘宝商品详情,获得淘宝app商品详情原数据 ,获得淘口令真实url API,按图搜索淘宝商品(拍立淘) API )

主流电商平台商品接口在电商企业中具有重要应用价值。通过商品接口,电商企业可以实现商品同步功能: 商品信息同步:通过接口可以实时同步主流电商平台上的商品信息,包括商品标题、价格、库存、销量等数据,确保企业在自…

[leetcode]search-insert-position 搜索插入位置

. - 力扣&#xff08;LeetCode&#xff09; class Solution { public:int searchInsert(vector<int>& nums, int target) {int left 0, right nums.size()-1;while(left <right) {int mid left (right-left)/2;if(nums[mid] target){return mid;} else if(nu…

subline设置打开文件重启一个新的窗口

问题 打开文件后&#xff0c;用的是同一个窗口的子tab页面 想要打开一个新的窗口 解决 点解preferences->setting 在右边的配置文件新增一行 “open_files_in_new_window”: “always” 保存 搞定&#xff01;

立创ESP32C3学习笔记

好的设计可以学到很多知识和细节&#xff0c;就如同学会一个数学知识点最好的方法是做典型例题。 乐鑫关于产品的硬件设计都有硬件设计指南&#xff0c;设计板子的时候需要仔细阅读&#xff1a; 原理图设计 - ESP32-C3 - — ESP 硬件设计指南 latest 文档 (espressif.com) 技…

IP地址查询和代理服务器:双重保护隐私

随着网络应用的日益普及&#xff0c;我们的个人信息和数据安全面临前所未有的挑战。在此背景下&#xff0c;IP地址查询和代理服务器成为保护个人隐私和网络安全的两大关键工具。本文将从IP地址查询的原理和应用出发&#xff0c;深入剖析代理服务器在网络隐私保护中的作用&#…

JS(JavaScript)事件处理(事件绑定)趣味案例

天行健&#xff0c;君子以自强不息&#xff1b;地势坤&#xff0c;君子以厚德载物。 每个人都有惰性&#xff0c;但不断学习是好好生活的根本&#xff0c;共勉&#xff01; 文章均为学习整理笔记&#xff0c;分享记录为主&#xff0c;如有错误请指正&#xff0c;共同学习进步。…

5. Spring IoCDI ★ ✔

5. Spring IoC&DI 1. IoC & DI ⼊⻔1.1 Spring 是什么&#xff1f;★ &#xff08;Spring 是包含了众多⼯具⽅法的 IoC 容器&#xff09;1.1.1 什么是容器&#xff1f;1.1.2 什么是 IoC&#xff1f;★ &#xff08;IoC: Inversion of Control (控制反转)&#xff09;总…

分布式kettle调度管理平台简介

介绍 Kettle&#xff08;也称为Pentaho Data Integration&#xff09;是一款开源的ETL&#xff08;Extract, Transform, Load&#xff09;工具&#xff0c;由Pentaho&#xff08;现为Hitachi Vantara&#xff09;开发和维护。它提供了一套强大的数据集成和转换功能&#xff0c…

第二十课,认识列表与定义列表

一&#xff0c;列表的作用 思考一个问题&#xff1a;如果我想要在程序中&#xff0c;记录5名学生的信息&#xff0c;如姓名。 如何做呢&#xff1f; 这就是列表的作用&#xff0c;能帮助我们更加高效的存储各种数据 思考&#xff1a;如果一个班级100位学生&#xff0c;每个人…

毅速丨金属3D打印是制造业转型升级的重要技术

随着科技的进步&#xff0c;金属3D打印技术已成为制造业升级的重要驱动力。它以其独特的优势&#xff0c;正引领着制造业迈向新的未来。 金属3D打印技术的突破&#xff1a; 设计自由。金属3D打印能制造任意形状和结构的零件&#xff0c;为设计师提供了无限的创意空间。 快速制…

java基于ssm+jsp 扶贫惠农推介系统

1管理员功能模块 管理员输入个人的用户名、密码、角色登录系统&#xff0c;这时候系统的数据库就会在进行查找相关的信息&#xff0c;如果我们输入的用户名、密码不正确&#xff0c;数据库就会提示出错误的信息提示&#xff0c;同时会提示管理员重新输入自己的用户名、密码&am…

计算机网络:408考研|湖科大教书匠|原理参考模型I|学习笔记

系列目录 计算机网络总纲领 计算机网络特殊考点 计算机网络原理参考模型I 计算机网络原理参考模型II 目录 系列目录更新日志数据链路层(Data Link Layer)一、基本概念二、三个重要问题三、 &#x1f31f;点对点协议(PPP, Point-to-Point Protocol)四、 以太网五、802.11 无线局…

CUDA 编程

## blocksize和gridsize设置 使用deviceQuery查看GPU相关信息(下图为1080 ti)blocksize的最大值建议不要超过Maximum number of threads per block&#xff08;1024&#xff09;由于每个block里的线程需要被分为数个wrap&#xff0c;而wrap size为32&#xff08;Warp size&…

DDMA信号处理以及数据处理的流程---聚类

Hello,大家好,我是Xiaojie,好久不见,欢迎大家能够和Xiaojie一起学习毫米波雷达知识,Xiaojie准备连载一个系列的文章—DDMA信号处理以及数据处理的流程,本系列文章将从目标生成、信号仿真、测距、测速、cfar检测、测角、目标聚类、目标跟踪这几个模块逐步介绍,这个系列的…

昇思25天学习打卡营第2天|探索张量:从创建到运算,包括属性、索引、与 NumPy 转换及稀疏张量

目录 张量的介绍 MindSpore 及其张量相关模块的导入配置 创建张量 介绍 根据数据直接生成 从NumPy数组生成 使用init初始化器构造张量 继承另一个张量的属性&#xff0c;形成新的张量 张量的属性 张量的索引 张量的运算 Tensor与NumPy转换 Tensor转换为NumPy NumPy…

CISCN--西南半决赛--pwn

1.vuln 这是主函数&#xff0c;数一下就发现可以溢出最后的0x4008d0 然后会执行到这里&#xff0c;逻辑就是在v0上写shellcode&#xff0c;不过执行写0x10&#xff0c;不够sh&#xff0c;很明显要先read。 以下是exp: from pwn import * context.archamd64 ioprocess(./vuln)…