前端技术
HTML
CSS
Javascript
前端框架和UI库
VUE
ReactJS
AngularJS
JQuery
NodeJS
JSON
Element-UI
Bootstrap
Material UI
服务端和客户端
Java
Python
PHP
Golang
Scala
Kotlin
Groovy
Ruby
Lua
.net
c#
c++
后端WEB和工程框架
SpringBoot
SpringCloud
Struts2
MyBatis
Hibernate
Tornado
Beego
Go-Spring
Go Gin
Go Iris
Dubbo
HessianRPC
Maven
Gradle
数据库
MySQL
Oracle
Mongo
中间件与web容器
Redis
MemCache
Etcd
Cassandra
Kafka
RabbitMQ
RocketMQ
ActiveMQ
Nacos
Consul
Tomcat
Nginx
Netty
大数据技术
Hive
Impala
ClickHouse
DorisDB
Greenplum
PostgreSQL
HBase
Kylin
Hadoop
Apache Pig
ZooKeeper
SeaTunnel
Sqoop
Datax
Flink
Spark
Mahout
数据搜索与日志
ElasticSearch
Apache Lucene
Apache Solr
Kibana
Logstash
数据可视化与OLAP
Apache Atlas
Superset
Saiku
Tesseract
系统与容器
Linux
Shell
Docker
Kubernetes
[子查询]的搜索结果
这里是文章列表。热门标签的颜色随机变换,标签颜色没有特殊含义。
点击某个标签可搜索标签相关的文章。
点击某个标签可搜索标签相关的文章。
转载文章
...本,强化了对复杂关联查询和批量更新的支持,使得用户能够更加高效地执行类似文章中的数据订正操作。例如,新版本优化了MERGE INTO语法的性能,不仅提高了大数据量下的处理速度,而且增强了其并发控制能力,降低了在多线程环境下可能出现的数据冲突风险。 此外,针对跨表字段更新的场景,一些数据库专家也提出了利用窗口函数进行数据订正的新思路。通过ROW_NUMBER()、RANK()等窗口函数,可以确保在有多条关联记录的情况下选取指定的一条进行更新,进一步丰富了数据订正策略的选择范围。 另外,在SQL Server及PostgreSQL等其他主流数据库系统中,虽然不支持UPDATE FROM语法,但它们各自提供了独特的解决方案。比如SQL Server采用JOIN子句配合UPDATE实现跨表更新,而PostgreSQL则支持使用FROM子句完成类似操作,这些方法同样值得广大数据库管理员和技术开发者关注与学习。 综上所述,无论是紧跟数据库技术的最新动态,还是深入研究不同系统的特性和最佳实践,都将有助于我们在日常工作中更有效地处理数据订正以及关联表字段同步等问题,提升数据管理与维护的效率和准确性。
2023-09-10 10:14:44
798
转载
Hive
...,如果你正在执行一个查询,那么你就会有一个Hive连接。当你在执行另一个查询时,你会再获得一个新的连接。要是连接数量超过了设定的那个上限(通常就是默认的那个数值),接下来新的查询请求就会被无情地拒之门外了。 三、为什么会出现Hive连接数超限的问题? Hive连接数超限的问题通常出现在以下几种情况: 1. 数据量过大 如果你的数据集非常大,那么你可能需要更多的连接来处理它。 2. 查询复杂度过高 如果一个查询包含了大量的子查询或者复杂的逻辑,那么Hive可能需要更多的连接来执行这个查询。 3. 连接管理不当 如果你没有正确地管理你的连接,例如关闭不再使用的连接,那么你也可能会出现连接数超限的问题。 四、如何解决Hive连接数超限的问题? 下面是一些可能的解决方案: 1. 增加Hive的连接数上限 你可以通过修改Hive的配置文件来增加Hive的连接数上限。比如,你可以尝试把hive.server2.thrift.max.worker.threads这个参数调大一些。 bash 在hive-site.xml文件中增加如下配置 hive.server2.thrift.max.worker.threads 100 2. 分批处理数据 如果你的数据集非常大,那么你可以尝试分批处理数据。这样可以避免一次性打开大量的连接。 sql -- 使用Hive的分区功能进行分批处理 CREATE TABLE my_table ( id INT, name STRING, age INT) PARTITIONED BY (year INT, month INT); INSERT INTO TABLE my_table PARTITION(year=2020, month=1) SELECT FROM small_table; 3. 管理连接 你应该确保你正确地管理你的连接,例如关闭不再使用的连接。 python 使用Python的psutil库来监控连接 import psutil process = psutil.Process() connections = process.connections(kind=(psutil.AF_INET, psutil.SOCK_STREAM)) for conn in connections: print(conn.laddr) 五、结论 Hive连接数超限是一个常见的问题,但也是一个可以通过适当的管理和优化来解决的问题。当你掌握了这个问题的来龙去脉,摸清了可能的解决方案后,咱们就能更溜地运用Hive这个工具,高效处理那些海量数据啦!
2023-02-16 22:49:34
455
素颜如水-t
ElasticSearch
...tch_phrase查询和span_first函数。首先,match_phrase查询可以用来指定要查询的完整字符串,如果文档中包含这个字符串,则匹配成功。其次,span_first函数可以让我们选择第一个匹配到的子串。 下面是一段使用Elasticsearch的示例代码: python GET /my_index/_search { "query": { "bool": { "should": [ { "match_phrase": { "title": { "query": "quick brown fox", "slop": 3, "max_expansions": 100 } } }, { "span_first": { "clauses": [ { "match": { "body": { "query": "brown fox", "slop": 3, "max_expansions": 100 } } } ], "end_offset": 30 } } ] } } } 在这个例子中,我们使用了一个布尔查询,其中包含了两个子查询:一个是match_phrase查询,另一个是span_first函数。match_phrase查询用于查找包含“quick brown fox”的文档,而span_first函数则用于查找包含“brown fox”的文档,并且确保其出现在“quick brown fox”之后。 四、如何优化邻近匹配性能? 除了使用Elasticsearch提供的工具外,我们还可以通过一些其他的手段来优化邻近匹配的性能。例如,我们可以增加索引缓存大小、减少搜索范围、合理设置匹配阈值等。 总的来说,Elasticsearch是一款非常强大的搜索引擎工具,它可以帮助我们快速地找到符合条件的数据。同时呢,我们还可以用上一些小窍门和方法,让邻近匹配这事儿变得更有效率、更精准,就像是给它装上了加速器和定位仪一样。希望本文的内容对你有所帮助!
2023-05-29 16:02:42
463
凌波微步_t
MySQL
...作 1. 数据表联合查询:使用UNION、UNION ALL操作符将多个SELECT语句的结果集合并起来。 2. 分组查询:使用GROUP BY子句对结果集进行分组。 3. 常见子查询:使用子查询语句作为SELECT语句的一部分进行查询。 4. 数据库备份和恢复:使用备份手段和恢复手段对数据库进行备份和恢复操作。 五、MySQL的优化 1. 使用索引:对于经常查询的字段名,可以创建索引来提高检索速度。 2. 优化查询语句:使用EXPLAIN语句分析SQL语句,查看索引使用情况,可以优化查询语句。 3. 控制连接数:控制数据库连接数可以避免连接过多导致数据库性能下降。 4. 内存优化:通过调整MySQL的内存参数,优化数据库性能。 总之,MySQL是一种功能强大的数据库系统管理软件,需要我们掌握其基础概念、操作符、函数、数据类型、高级操作及优化等知识点。只有全面了解MySQL,才能更好地应对各种复杂的数据处理问题。
2023-09-03 11:49:35
62
键盘勇士
MyBatis
...要包括: - 数据库查询效率低下:一次性获取大量数据,可能导致SQL查询执行时间过长。 - 内存消耗过大:一次性加载大量数据到内存,可能导致Java Heap空间不足,甚至引发OOM(Out Of Memory)错误。 - 循环依赖与延迟加载陷阱:在实体类间存在复杂关联关系时,如果不合理配置懒加载,可能会触发N+1查询问题,严重降低系统性能。 2. 针对性优化策略及示例代码 2.1 SQL优化与分页查询 示例代码: java @Select("SELECT FROM large_table LIMIT {offset}, {limit}") List fetchLargeData(@Param("offset") int offset, @Param("limit") int limit); 在实际应用中,尽量避免一次性获取全部数据,而是采用分页查询的方式,通过LIMIT关键字实现数据的分批读取。例如,上述代码展示了一个分页查询的方法定义。 2.2 合理设置批量处理与流式查询 MyBatis 3.4.0及以上版本支持了ResultHandler接口以及useGeneratedKeys、fetchSize等属性,可以用来进行批量处理和流式查询,有效减少内存占用。 示例代码: java @Select("SELECT FROM large_table") @Results(id = "largeTableResult", value = { @Result(property = "id", column = "id") // 其他字段映射... }) void streamLargeData(ResultSetHandler handler); 在这个例子中,我们通过ResultSetHandler接口处理结果集,而非一次性加载到内存,这样就可以按需逐条处理数据,显著降低内存压力。 2.3 精细化配置懒加载与缓存策略 对于实体间的关联关系,应合理配置懒加载以避免N+1查询问题。另外,咱们也可以琢磨一下开启二级缓存这招,或者拉上像Redis这样的第三方缓存工具,这样一来,数据访问的速度就能噌噌噌地往上提了。 示例代码: xml 以上示例展示了如何在实体关联映射中启用懒加载,只有当真正访问LargeTable.detail属性时,才会执行对应的SQL查询。 3. 总结与思考 面对MyBatis处理大量数据时可能出现的性能瓶颈,我们应从SQL优化、分页查询、批量处理、懒加载策略等方面综合施策。同时呢,咱们得在实际操作中不断摸索、改进,针对不同的业务场景,灵活耍起各种技术手段,这样才能保证咱的系统在面对海量数据挑战时,能够轻松应对,游刃有余,就像一把磨得飞快的刀切豆腐一样。 在此过程中,我们需要保持敏锐的洞察力和持续优化的态度,理解并熟悉MyBatis的工作原理,才能逐步克服性能瓶颈,使我们的应用程序在海量数据面前展现出更强大的处理能力。同时,咱也得留意一下性能优化和代码可读性、维护性之间的微妙平衡,目标是追求那种既高效又易于理解和维护的最佳技术方案。
2023-08-07 09:53:56
56
雪落无痕
Greenplum
...旅,揭开那些能让你的查询速度飞升的超级秘诀吧! 二、 1. 索引优化 加速查询速度的黄金钥匙索引就像是图书馆的目录,能快速定位到我们想要的信息。在Greenplum中,创建合适的索引能显著提升查询效率。例如: sql CREATE INDEX idx_customer_name ON public.customer (name text); 当你需要根据名字搜索客户时,这个索引会大幅减少全表扫描的时间。记住,不是所有的字段都需要索引,过度索引反而会消耗资源。你需要根据查询频率和数据量来决定。 三、 2. 分区策略 数据管理的新思维分区是一种将大表划分为多个较小部分的技术,这样可以更有效地管理和查询数据。例如,按日期分区: sql CREATE TABLE sales ( ... sale_date date, ... ) PARTITION BY RANGE (sale_date); 这样,每次查询特定日期范围的数据,Greenplum只需扫描对应分区,而不是整个表,大大提高查询速度。 四、 3. 优化查询语句 少即是多编写高效的SQL查询至关重要。你知道吗,哥们儿,咱们在玩数据库的时候,尽量别傻乎乎地做全表搜索,一遇到JOIN操作,挑那种最顺手的联接方式,比如INNER JOIN或者LEFT JOIN,然后那些烦人的子查询,能少用就少用,效率能高不少!例如: sql -- 避免全表扫描 SELECT FROM customer WHERE id IN (SELECT customer_id FROM orders); -- 使用JOIN代替子查询 SELECT c.name, o.quantity FROM customer c JOIN orders o ON c.id = o.customer_id; 这些小改动可能看似微不足道,但在大规模数据上却能带来显著的性能提升。 五、4. 并行查询与负载均衡 让Greenplum跑起来 Greenplum的强大在于其并行处理能力。通过调整gp_segment_id(节点ID)和gp_distribution_policy,你可以充分利用集群资源。例如: sql -- 设置分布策略为散列分布 ALTER TABLE sales SET DISTRIBUTED BY (customer_id); -- 查询时指定并行度 EXPLAIN (ANALYZE, VERBOSE, COSTS) SELECT FROM sales WHERE sale_date = '2022-01-01' PARALLEL 4; 这样,Greenplum会将查询任务分解到多个节点并行执行,大大提高处理速度。 六、结语 提升Greenplum查询性能并非一蹴而就,它需要你对数据库深入理解,不断实践和调整。听着,每次的小改动都是为了让业务运转得更顺溜,数据和表现力就是我们的最佳代言。明白吗?我们是要用事实和成果来说话的!希望本文能为你在Greenplum的性能优化之旅提供一些灵感和方向。祝你在数据海洋中游刃有余!
2024-06-15 10:55:30
397
彩虹之上
ClickHouse
...越的性能和对海量数据查询的高效支持而备受青睐。在众多功能特性中,UNION操作符无疑是实现数据聚合、合并的关键利器。本文要带你一起“潜入”ClickHouse的UNION操作符的世界,手把手教你如何把它玩得溜起来。咱会用到大量接地气、实实在在的实例代码,让你像看懂故事一样轻松理解并掌握这个超级实用的功能,绝对让你收获满满! 2. UNION操作符基础理解 在ClickHouse中,UNION操作符用于将两个或多个SELECT语句的结果集合并为一个单一的结果集。就像玩拼图那样,它能帮我们将来自各个表格或子查询中的数据片段,像搭积木一样天衣无缝地拼凑起来,让这些信息完美衔接。注意,UNION会去除重复行,若需要包含所有行(包括重复行),则需使用UNION ALL。 例如: sql SELECT FROM table1 UNION ALL SELECT FROM table2; 此例展示了从table1和table2中选取所有记录并合并的过程,其中可能包含相同的记录。 3. UNION操作符的高效使用策略 3.1 结构一致性 使用UNION时,各个SELECT语句的选择列表必须具有相同数量且对应位置的数据类型一致。这是保证数据能够正确合并的前提条件: sql SELECT id, name FROM users WHERE age > 20 UNION SELECT id, username FROM admins WHERE status = 'active'; 在这个例子中,虽然选择了不同的表,但id字段和name/username字段类型匹配,因此可以进行合并。 3.2 索引优化与排序 尽管UNION本身不会改变数据的物理顺序,但在实际应用中,如果预先对源数据进行了恰当的索引设置,并结合ORDER BY进行排序,可显著提高执行效率。 sql -- 假设已为age和status字段建立索引 (SELECT id, name FROM users WHERE age > 20 ORDER BY id) UNION ALL (SELECT id, username FROM admins WHERE status = 'active' ORDER BY id); 3.3 分布式环境下的UNION操作 在分布式集群环境下,合理利用分布式表结构和UNION能有效提升大规模数据处理能力。例如,当多个节点分别存储了部分数据时,可通过UNION跨节点汇总数据: sql SELECT FROM ( SELECT FROM distributed_table_1 UNION ALL SELECT FROM distributed_table_2 ) AS combined_data WHERE some_condition; 4. 探讨与思考 我们在实际运用ClickHouse的UNION操作符时,不仅要关注其语法形式,更要注重其实现背后的逻辑和性能影响。针对特定场景选择合适的策略,如确保数据结构一致性、合理利用索引和排序以降低IO成本,以及在分布式环境中巧妙合并数据等,这些都将是提升查询性能的关键所在。 总之,在追求数据处理效率的道路上,掌握并熟练运用ClickHouse的UNION操作符无疑是我们手中的一把利剑。一起来,咱们动手实践,不断探寻其中的宝藏,让这股力量赋能我们的数据分析,提升业务决策的精准度和效率,就像挖金矿一样,越挖越有惊喜! > 注:以上示例仅为简化演示,实际应用中请根据具体业务需求调整SQL语句和数据表结构。同时呢,为了让大家读起来不那么吃力,我在这儿就只挑了几种最常见的应用场景来举例子,实际上UNION这个操作符的能耐可不止这些,它在实际使用中的可能性多到超乎你的想象!所以,还请大家亲自上手试试看,去探索更多意想不到的用法吧!
2023-09-08 10:17:58
427
半夏微凉
Impala
Impala查询优化器:揭秘查询优化器的秘密 01 引言 在大数据分析的世界里,Impala以其高性能、实时查询的特性赢得了广泛的认可。Impala查询优化器,这玩意儿可是整个系统的关键部件之一,你就想象它是个隐形的、贼机灵还特勤快的小助手,悄无声息地在背后帮咱们把SQL查询给大卸八块,仔仔细细捯饬一遍,目的就是为了让查询跑得更快,资源利用更充分,妥妥的“幕后功臣”一枚。本文将带大家深入探索Impala查询优化器的工作原理,通过实例代码揭示其中的秘密。 02 Impala查询优化器概览 Impala查询优化器的主要任务是将我们提交的SQL语句转化为高效执行计划。它就像个精打细算的小能手,会先摸底各种可能的执行方案,挨个评估、对比,最后选出那个花钱最少(或者说预计跑得最快的)的最优路径来实施。这个过程犹如一位精密的导航员,在海量数据的大海中为我们的查询找到最优航线。 03 查询优化器工作流程 1. 解析与验证阶段 当我们提交一条SQL查询时,优化器首先对其进行词法和语法解析,确保SQL语句结构正确。例如: sql -- 示例SQL查询 SELECT FROM employees WHERE department = 'IT' ORDER BY salary DESC; 2. 逻辑优化阶段 解析后的SQL被转化为逻辑执行计划,如关系代数表达式。在此阶段,优化器会进行子查询展开、常量折叠等逻辑优化操作。 3. 物理优化阶段 进一步地,优化器会生成多种可能的物理执行计划,并计算每种计划的执行代价(如I/O代价、CPU代价)。比如,拿刚才那个查询来说吧,我们可能会琢磨两种不同的处理方法。一种呢,是先按照部门给它筛选一遍,然后再来个排序;另一种嘛,就是先不管三七二十一,先排个序再说,完了再进行过滤操作。 4. 计划选择阶段 根据各种物理执行计划的代价估算,优化器会选择出代价最低的那个计划。最终,Impala将按照选定的最优执行计划来执行查询。 04 实战示例:观察查询计划 让我们实际动手,通过EXPLAIN命令观察Impala如何优化查询: sql -- 使用EXPLAIN命令查看查询计划 EXPLAIN SELECT FROM employees WHERE department = 'IT' ORDER BY salary DESC; 运行此命令后,Impala会返回详细的执行计划,其中包括了各个阶段的操作符、输入输出以及预估的行数和代价。从这些信息中,我们可以窥见查询优化器背后的“智慧”。 05 探讨与思考 理解查询优化器的工作机制,有助于我们在编写SQL查询时更好地利用Impala的性能优势,比如合理设计索引、避免全表扫描等。同时呢,咱们也得明白这么个道理,虽然现在这查询优化器已经聪明到飞起,但在某些特定的情况下,它可能也会犯迷糊,没法选出最优解。这时候啊,就得我们这些懂业务、又摸透数据库原理的人出手了,瞅准时机,亲自上阵给它来个手工优化,让事情变得美滋滋的。 总结来说,Impala查询优化器是我们在大数据海洋中探寻宝藏的重要工具,只有深入了解并熟练运用,才能让我们的数据探索之旅更加高效顺畅。让我们一起携手揭开查询优化器的秘密,共同探索这片充满无限可能的数据世界吧!
2023-10-09 10:28:04
408
晚秋落叶
MySQL
...。哎呀,当我捣鼓这个查询的时候,发现这整个过程竟然磨叽了将近九十分钟,真是让我大吃一惊,满脑袋都是问号啊! 经过一段时间的调试和分析,我发现这个问题主要是由于MySQL的内部实现导致的。讲得更直白一点,COUNT函数这家伙要是碰上一大堆数据,它就会老老实实地一行接一行、仔仔细细地扫过去。每扫到一行,都得停下来瞅一眼看看是不是有NULL值存在。这种做法在应对小规模数据的时候,也许还能勉强过关,但一旦遇到百万乃至千万量级的大数据,那就真的有点力不从心,效率低到让人头疼了。 解决思路: 那么,面对这种情况,我们又该如何优化呢?实际上,有很多方法可以提高MySQL的COUNT性能,下面我就列举几种比较常见的优化策略。 方法一:减少NULL值的数量 MySQL在处理COUNT函数时,会对每行进行一次NULL检查。要是数据集里头有许多NULL值,这个检测就得超级频繁地进行,这样一来,整个查询过程就会像蜗牛爬行一样慢吞吞的。所以,咱们可以试着尽可能地把NULL值的数量降到最低。具体怎么做呢?比如在设计数据库的时候,就预先考虑到避免出现NULL的情况;或者在数据清洗的过程中,遇到NULL值就给它填充上合适的数值。让这些讨厌的NULL值少冒出来,让我们的数据更加干净、完整。 代码示例: sql -- 使用COALESCE函数填充NULL值 UPDATE table_name SET column_name = COALESCE(column_name, 'default_value'); 方法二:使用覆盖索引 当我们经常使用COUNT函数并附加了特定的筛选条件时,我们可以考虑为该字段创建一个覆盖索引。这样,MySQL可以直接从索引中获取我们需要的信息,而无需扫描整个数据集。 代码示例: sql CREATE INDEX idx_column ON table_name (column_name); 方法三:使用子查询代替COUNT函数 有时候,我们可以通过使用子查询来代替COUNT函数,从而提高查询的性能。这是因为MySQL在处理子查询时,通常会使用更高效的算法来查找匹配的结果。 代码示例: sql SELECT COUNT() FROM ( SELECT column_name FROM table_name WHERE condition ) subquery; 总结: 以上就是我对MySQL COUNT函数的一些理解和实践经验。总的来说,MySQL的性能优化这活儿,既复杂又挺有挑战性,就像是个无底洞的知识宝库,让人忍不住想要一直探索和实践。说白了,就是咱得不断学习、不断动手尝试,才能真正玩转起来,相当有趣儿!当然啦,刚才提到的那些方法只不过是冰山小小一角而已,实际情况嘛,咱们得根据自身的具体需求来灵活挑选和调整,这才是硬道理!我坚信,在不久以后的日子里,咱们一定能探索发掘出更多更棒的优化窍门,让MySQL这个家伙爆发出更大的能量,发挥出无与伦比的价值。
2023-12-14 12:55:14
46
星河万里_t
Hive
...例分析 优化Hive查询性能的策略 为了更好地利用Hive的并行计算能力,我们可以采取以下几种策略来优化查询性能: 1. 合理使用分区和表结构 sql CREATE TABLE sales ( date STRING, product STRING, quantity INT ) PARTITIONED BY (year INT, month INT); 分区操作能帮助Hive在执行查询时快速定位到特定的数据集,从而减少扫描的文件数量,提高查询效率。 2. 利用索引增强查询性能 sql CREATE INDEX idx_sales_date ON sales (date); 索引可以显著加快基于某些列的查询速度,特别是在进行过滤和排序操作时。 3. 优化查询语句 - 避免使用昂贵的函数和复杂的子查询。 - 使用EXPLAIN命令预览查询计划,识别瓶颈并进行调整。 sql EXPLAIN SELECT FROM sales WHERE year = 2023 AND month = 5; 4. 批处理与实时查询分离 对于频繁执行的查询,考虑将其转换为更高效的批处理作业,而非实时查询。 四、实践与经验分享 在实际操作中,我们发现以下几点经验尤为重要: - 数据预处理:确保数据在导入Hive前已经进行了清洗和格式化,减少无效数据的处理时间。 - 定期维护:定期清理不再使用的数据和表,以及更新索引,保持系统的高效运行。 - 监控与调优:利用Hive Metastore提供的监控工具,持续关注查询性能,并根据实际情况调整配置参数。 五、结论 并行计算与Hive的未来展望 随着大数据技术的不断发展,Hive在并行计算领域的潜力将进一步释放。哎呀,兄弟!咱们得好好调整数据存档的布局,还有那些查询命令和系统的设定,这样才能让咱们的数据处理快如闪电,用户体验棒棒哒!到时候,用咱们的服务就跟喝着冰镇可乐一样爽,那叫一个舒坦啊!哎呀,你知道不?就像咱们平时用的工具箱里又添了把更厉害的瑞士军刀,那就是Apache Drill这样的新技术。这玩意儿一出现,Hive这个大数据分析的家伙就更牛了,能干的事情更多,效率也更高,就像开挂了一样。它现在不仅能快如闪电地处理数据,还能像变魔术一样,根据我们的需求变出各种各样的分析结果。这下子,咱们做数据分析的时候,可就轻松多了! --- 本文旨在探讨Hive如何通过并行计算能力提升数据处理效率,通过具体实例展示了如何优化Hive查询性能,并分享了实践经验。希望这些内容能对您在大数据分析领域的工作提供一定的启发和帮助。
2024-09-13 15:49:02
35
秋水共长天一色
PostgreSQL
...,但强烈建议你总是为查询加上一个排序条件,因为没有明确的排序规则时,返回的数据可能会出现不一致的情况。 2.2 实战演练:分页查询实例 假设你有一个名为products的表,里面存储了各种产品的信息,你想实现一个分页功能来展示这些产品。首先,你得搞清楚用户现在要看的是哪一页(就是每页显示多少条记录),然后用这个信息算出正确的OFFSET值。这样子才能让用户的请求对上数据库里的数据。 sql -- 假设每页显示10条记录 WITH page AS ( SELECT product_id, name, price, ROW_NUMBER() OVER (ORDER BY product_id) AS row_number FROM products ) SELECT FROM page WHERE row_number BETWEEN (page_number - 1) items_per_page + 1 AND page_number items_per_page; 这里的page_number和items_per_page是根据前端传入的参数动态计算出来的。这样,无论用户请求的是第几页,你都可以正确地返回对应的数据。 2.3 排序的魅力 排序同样重要。通过在查询中添加ORDER BY子句,我们可以控制数据的输出顺序。比如,如果你想按价格降序排列产品列表,可以这样写: sql SELECT FROM products ORDER BY price DESC; 或者,如果你想让用户能够自由选择排序方式,可以在应用层接收用户的输入,并相应地调整SQL语句中的排序条件。 3. 结合分页与排序 实战案例 接下来,让我们将分页和排序结合起来,看看实际效果。咱们有个卖东西的网站,得弄个页面能让大伙儿按不同的标准(比如说价格高低、卖得快不快这些)来排产品。这样大家找东西就方便多了。 sql WITH sorted_products AS ( SELECT FROM products ORDER BY CASE WHEN :sort_by = 'price' THEN price END ASC, CASE WHEN :sort_by = 'sales' THEN sales END DESC ) SELECT FROM sorted_products LIMIT :items_per_page OFFSET (:page_number - 1) :items_per_page; 在这个例子中,:sort_by、:items_per_page和:page_number都是从用户输入或配置文件中获取的变量。这种方式使得我们的查询更加灵活,能够适应不同的业务场景。 4. 总结与反思 通过这篇文章,我们探索了如何在PostgreSQL中有效地实现数据的分页和排序功能。别看这些技术好像挺简单,其实它们对提升用户体验和让系统跑得更顺畅可重要着呢!当然啦,随着项目的不断推进,你可能会碰到更多棘手的问题,比如说要应对大量的同时访问,还得绞尽脑汁优化查询速度啥的。不过别担心,掌握了基础之后,一切都会变得容易起来。 希望这篇技术分享对你有所帮助,也欢迎你在评论区分享你的想法和经验。让我们一起进步,共同成长! --- 这就是我关于“如何在数据库中实现数据的分页和排序功能?”的全部内容啦!如果你对PostgreSQL或者其他数据库技术有任何疑问或见解,记得留言哦。编程路上,我们一起加油!
2024-10-17 16:29:27
53
晚秋落叶
Apache Lucene
...yParser解析查询字符串,并使用IndexSearcher执行搜索操作。通过这种方式,我们可以轻松地从索引中检索出相关的文档。 3.2 高级搜索技巧:优化你的查询 当你开始构建更复杂的搜索逻辑时,Lucene提供了许多高级功能来帮助你优化搜索结果。比如说,你可以用布尔查询把好几个搜索条件拼在一起,或者用模糊匹配让搜索变得更灵活一点。这样找东西就方便多了! java import org.apache.lucene.index.Term; import org.apache.lucene.search.BooleanClause; import org.apache.lucene.search.BooleanQuery; import org.apache.lucene.search.FuzzyQuery; // 构建布尔查询 BooleanQuery booleanQuery = new BooleanQuery(); booleanQuery.add(new TermQuery(new Term("content", "hello")), BooleanClause.Occur.MUST); booleanQuery.add(new FuzzyQuery(new Term("content", "lucen")), BooleanClause.Occur.SHOULD); TopDocs searchResults = searcher.search(booleanQuery, 10); 在这个例子中,我们创建了一个布尔查询,其中包含两个子查询:一个是必须满足的精确匹配查询,另一个是可选的模糊匹配查询。这种组合可以显著提升搜索的准确性和相关性。 四、结语 享受编码的乐趣 通过这篇文章,我们不仅学习了如何使用Apache Lucene来创建和搜索索引,还一起探讨了如何有效地避免NullPointerException。希望这些示例代码和技巧能对你有所帮助。记住,编程不仅仅是一门技术,更是一种艺术。尽情享受编程的乐趣吧,一路探索和学习,你会发现自己的收获多到让人惊喜!如果你有任何问题或想法,欢迎随时与我交流! --- 以上就是关于Apache Lucene与javalangNullPointerException: null的讨论。希望能通过这篇文章点燃你对Lucene的热情,让你在实际开发中游刃有余,玩得更嗨!让我们一起继续探索更多有趣的技术吧!
2024-10-16 15:36:29
88
岁月静好
转载文章
...句类型,比如:关联子查询 支持绝大部分PostgreSQL的SQL语句 分布式多版本并发控制(MVCC:Multi-version Concurrency Control) 支持JSON和XML格式 Postgres-XL缺少的功能 内建的高可用机制 使用外部机制实现高可能,如:Corosync/Pacemaker 有未来功能提升的空间 增加节点/重新分片数据(re-shard)的简便性 数据重分布(redistribution)期间会锁表 可采用预分片(pre-shard)方式解决,在同台物理服务器上建立多个数据节点,每个节点存储一个数据分片。数据重分布时,将一些数据节点迁出即可 某些外键、唯一性约束功能 Postgres-XL架构 [外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-M9lFuEIP-1640133702200)(./assets/postgre-xl.jpg)] 基于开源项目Postgres-XC XL增加了MPP,允许数据节点间直接通讯,交换复杂跨节点关联查询相关数据信息,减少协调器负载。 多个协调器(Coordinator) 应用程序的数据库连入点 分析查询语句,生成执行计划 多个数据节点(DataNode) 实际的数据存储 数据自动打散分布到集群中各数据节点 本地执行查询 一个查询在所有相关节点上并行查询 全局事务管理器(GTM:Global Transaction Manager) 提供事务间一致性视图 部署GTM Proxy实例,以提高性能 Postgre-XL主要组件 GTM (Global Transaction Manager) - 全局事务管理器 GTM是Postgres-XL的一个关键组件,用于提供一致的事务管理和元组可见性控制。 GTM Standby GTM的备节点,在pgxc,pgxl中,GTM控制所有的全局事务分配,如果出现问题,就会导致整个集群不可用,为了增加可用性,增加该备用节点。当GTM出现问题时,GTM Standby可以升级为GTM,保证集群正常工作。 GTM-Proxy GTM需要与所有的Coordinators通信,为了降低压力,可以在每个Coordinator机器上部署一个GTM-Proxy。 Coordinator --协调器 协调器是应用程序到数据库的接口。它的作用类似于传统的PostgreSQL后台进程,但是协调器不存储任何实际数据。实际数据由数据节点存储。协调器接收SQL语句,根据需要获取全局事务Id和全局快照,确定涉及哪些数据节点,并要求它们执行(部分)语句。当向数据节点发出语句时,它与GXID和全局快照相关联,以便多版本并发控制(MVCC)属性扩展到集群范围。 Datanode --数据节点 用于实际存储数据。表可以分布在各个数据节点之间,也可以复制到所有数据节点。数据节点没有整个数据库的全局视图,它只负责本地存储的数据。接下来,协调器将检查传入语句,并制定子计划。然后,根据需要将这些数据连同GXID和全局快照一起传输到涉及的每个数据节点。数据节点可以在不同的会话中接收来自各个协调器的请求。但是,由于每个事务都是惟一标识的,并且与一致的(全局)快照相关联,所以每个数据节点都可以在其事务和快照上下文中正确执行。 Postgres-XL继承了PostgreSQL Postgres-XL是PostgreSQL的扩展并继承了其很多特性: 复杂查询 外键 触发器 视图 事务 MVCC(多版本控制) 此外,类似于PostgreSQL,用户可以通过多种方式扩展Postgres-XL,例如添加新的 数据类型 函数 操作 聚合函数 索引类型 过程语言 安装 环境说明 由于资源有限,gtm一台、另外两台身兼数职。 主机名 IP 角色 端口 nodename 数据目录 gtm 192.168.20.132 GTM 6666 gtm /nodes/gtm 协调器 5432 coord1 /nodes/coordinator xl1 192.168.20.133 数据节点 5433 node1 /nodes/pgdata gtm代理 6666 gtmpoxy01 /nodes/gtm_pxy1 协调器 5432 coord2 /nodes/coordinator xl2 192.168.20.134 数据节点 5433 node2 /nodes/pgdata gtm代理 6666 gtmpoxy02 /nodes/gtm_pxy2 要求 GNU make版本 3.8及以上版本 [root@pg ~] make --versionGNU Make 3.82Built for x86_64-redhat-linux-gnuCopyright (C) 2010 Free Software Foundation, Inc.License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>This is free software: you are free to change and redistribute it.There is NO WARRANTY, to the extent permitted by law. 需安装GCC包 需安装tar包 用于解压缩文件 默认需要GNU Readline library 其作用是可以让psql命令行记住执行过的命令,并且可以通过键盘上下键切换命令。但是可以通过--without-readline禁用这个特性,或者可以指定--withlibedit-preferred选项来使用libedit 默认使用zlib压缩库 可通过--without-zlib选项来禁用 配置hosts 所有主机上都配置 [root@xl2 11] cat /etc/hosts127.0.0.1 localhost192.168.20.132 gtm192.168.20.133 xl1192.168.20.134 xl2 关闭防火墙、Selinux 所有主机都执行 关闭防火墙: [root@gtm ~] systemctl stop firewalld.service[root@gtm ~] systemctl disable firewalld.service selinux设置: [root@gtm ~]vim /etc/selinux/config 设置SELINUX=disabled,保存退出。 This file controls the state of SELinux on the system. SELINUX= can take one of these three values: enforcing - SELinux security policy is enforced. permissive - SELinux prints warnings instead of enforcing. disabled - No SELinux policy is loaded.SELINUX=disabled SELINUXTYPE= can take one of three two values: targeted - Targeted processes are protected, minimum - Modification of targeted policy. Only selected processes are protected. mls - Multi Level Security protection. 安装依赖包 所有主机上都执行 yum install -y flex bison readline-devel zlib-devel openjade docbook-style-dsssl gcc 创建用户 所有主机上都执行 [root@gtm ~] useradd postgres[root@gtm ~] passwd postgres[root@gtm ~] su - postgres[root@gtm ~] mkdir ~/.ssh[root@gtm ~] chmod 700 ~/.ssh 配置SSH免密登录 仅仅在gtm节点配置如下操作: [root@gtm ~] su - postgres[postgres@gtm ~] ssh-keygen -t rsa[postgres@gtm ~] cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys[postgres@gtm ~] chmod 600 ~/.ssh/authorized_keys 将刚生成的认证文件拷贝到xl1到xl2中,使得gtm节点可以免密码登录xl1~xl2的任意一个节点: [postgres@gtm ~] scp ~/.ssh/authorized_keys postgres@xl1:~/.ssh/[postgres@gtm ~] scp ~/.ssh/authorized_keys postgres@xl2:~/.ssh/ 对所有提示都不要输入,直接enter下一步。直到最后,因为第一次要求输入目标机器的用户密码,输入即可。 下载源码 下载地址:https://www.postgres-xl.org/download/ [root@slave ~] ll postgres-xl-10r1.1.tar.gz-rw-r--r-- 1 root root 28121666 May 30 05:21 postgres-xl-10r1.1.tar.gz 编译、安装Postgres-XL 所有节点都安装,编译需要一点时间,最好同时进行编译。 [root@slave ~] tar xvf postgres-xl-10r1.1.tar.gz[root@slave ~] ./configure --prefix=/home/postgres/pgxl/[root@slave ~] make[root@slave ~] make install[root@slave ~] cd contrib/ --安装必要的工具,在gtm节点上安装即可[root@slave ~] make[root@slave ~] make install 配置环境变量 所有节点都要配置 进入postgres用户,修改其环境变量,开始编辑 [root@gtm ~]su - postgres[postgres@gtm ~]vi .bashrc --不是.bash_profile 在打开的文件末尾,新增如下变量配置: export PGHOME=/home/postgres/pgxlexport LD_LIBRARY_PATH=$PGHOME/lib:$LD_LIBRARY_PATHexport PATH=$PGHOME/bin:$PATH 按住esc,然后输入:wq!保存退出。输入以下命令对更改重启生效。 [postgres@gtm ~] source .bashrc --不是.bash_profile 输入以下语句,如果输出变量结果,代表生效 [postgres@gtm ~] echo $PGHOME 应该输出/home/postgres/pgxl代表生效 配置集群 生成pgxc_ctl.conf配置文件 [postgres@gtm ~] pgxc_ctl prepare/bin/bashInstalling pgxc_ctl_bash script as /home/postgres/pgxl/pgxc_ctl/pgxc_ctl_bash.ERROR: File "/home/postgres/pgxl/pgxc_ctl/pgxc_ctl.conf" not found or not a regular file. No such file or directoryInstalling pgxc_ctl_bash script as /home/postgres/pgxl/pgxc_ctl/pgxc_ctl_bash.Reading configuration using /home/postgres/pgxl/pgxc_ctl/pgxc_ctl_bash --home /home/postgres/pgxl/pgxc_ctl --configuration /home/postgres/pgxl/pgxc_ctl/pgxc_ctl.confFinished reading configuration. PGXC_CTL START Current directory: /home/postgres/pgxl/pgxc_ctl 配置pgxc_ctl.conf 新建/home/postgres/pgxc_ctl/pgxc_ctl.conf文件,编辑如下: 对着模板文件一个一个修改,否则会造成初始化过程出现各种神奇问题。 pgxcInstallDir=$PGHOMEpgxlDATA=$PGHOME/data pgxcOwner=postgres---- GTM Master -----------------------------------------gtmName=gtmgtmMasterServer=gtmgtmMasterPort=6666gtmMasterDir=$pgxlDATA/nodes/gtmgtmSlave=y Specify y if you configure GTM Slave. Otherwise, GTM slave will not be configured and all the following variables will be reset.gtmSlaveName=gtmSlavegtmSlaveServer=gtm value none means GTM slave is not available. Give none if you don't configure GTM Slave.gtmSlavePort=20001 Not used if you don't configure GTM slave.gtmSlaveDir=$pgxlDATA/nodes/gtmSlave Not used if you don't configure GTM slave.---- GTM-Proxy Master -------gtmProxyDir=$pgxlDATA/nodes/gtm_proxygtmProxy=y gtmProxyNames=(gtm_pxy1 gtm_pxy2) gtmProxyServers=(xl1 xl2) gtmProxyPorts=(6666 6666) gtmProxyDirs=($gtmProxyDir $gtmProxyDir) ---- Coordinators ---------coordMasterDir=$pgxlDATA/nodes/coordcoordNames=(coord1 coord2) coordPorts=(5432 5432) poolerPorts=(6667 6667) coordPgHbaEntries=(0.0.0.0/0)coordMasterServers=(xl1 xl2) coordMasterDirs=($coordMasterDir $coordMasterDir)coordMaxWALsernder=0 没设置备份节点,设置为0coordMaxWALSenders=($coordMaxWALsernder $coordMaxWALsernder) 数量保持和coordMasterServers一致coordSlave=n---- Datanodes ----------datanodeMasterDir=$pgxlDATA/nodes/dn_masterprimaryDatanode=xl1 主数据节点datanodeNames=(node1 node2)datanodePorts=(5433 5433) datanodePoolerPorts=(6668 6668) datanodePgHbaEntries=(0.0.0.0/0)datanodeMasterServers=(xl1 xl2)datanodeMasterDirs=($datanodeMasterDir $datanodeMasterDir)datanodeMaxWalSender=4datanodeMaxWALSenders=($datanodeMaxWalSender $datanodeMaxWalSender) 集群初始化,启动,停止 初始化 pgxc_ctl -c /home/postgres/pgxc_ctl/pgxc_ctl.conf init all 输出结果: /bin/bashInstalling pgxc_ctl_bash script as /home/postgres/pgxc_ctl/pgxc_ctl_bash.Installing pgxc_ctl_bash script as /home/postgres/pgxc_ctl/pgxc_ctl_bash.Reading configuration using /home/postgres/pgxc_ctl/pgxc_ctl_bash --home /home/postgres/pgxc_ctl --configuration /home/postgres/pgxc_ctl/pgxc_ctl.conf/home/postgres/pgxc_ctl/pgxc_ctl.conf: line 189: $coordExtraConfig: ambiguous redirectFinished reading configuration. PGXC_CTL START Current directory: /home/postgres/pgxc_ctlStopping all the coordinator masters.Stopping coordinator master coord1.Stopping coordinator master coord2.pg_ctl: directory "/home/postgres/pgxc/nodes/coord/coord1" does not existpg_ctl: directory "/home/postgres/pgxc/nodes/coord/coord2" does not existDone.Stopping all the datanode masters.Stopping datanode master datanode1.Stopping datanode master datanode2.pg_ctl: PID file "/home/postgres/pgxc/nodes/datanode/datanode1/postmaster.pid" does not existIs server running?Done.Stop GTM masterwaiting for server to shut down.... doneserver stopped[postgres@gtm ~]$ echo $PGHOME/home/postgres/pgxl[postgres@gtm ~]$ ll /home/postgres/pgxl/pgxc/nodes/gtm/gtm.^C[postgres@gtm ~]$ pgxc_ctl -c /home/postgres/pgxc_ctl/pgxc_ctl.conf init all/bin/bashInstalling pgxc_ctl_bash script as /home/postgres/pgxc_ctl/pgxc_ctl_bash.Installing pgxc_ctl_bash script as /home/postgres/pgxc_ctl/pgxc_ctl_bash.Reading configuration using /home/postgres/pgxc_ctl/pgxc_ctl_bash --home /home/postgres/pgxc_ctl --configuration /home/postgres/pgxc_ctl/pgxc_ctl.conf/home/postgres/pgxc_ctl/pgxc_ctl.conf: line 189: $coordExtraConfig: ambiguous redirectFinished reading configuration. PGXC_CTL START Current directory: /home/postgres/pgxc_ctlInitialize GTM masterERROR: target directory (/home/postgres/pgxc/nodes/gtm) exists and not empty. Skip GTM initilializationDone.Start GTM masterserver startingInitialize all the coordinator masters.Initialize coordinator master coord1.ERROR: target coordinator master coord1 is running now. Skip initilialization.Initialize coordinator master coord2.The files belonging to this database system will be owned by user "postgres".This user must also own the server process.The database cluster will be initialized with locale "en_US.UTF-8".The default database encoding has accordingly been set to "UTF8".The default text search configuration will be set to "english".Data page checksums are disabled.fixing permissions on existing directory /home/postgres/pgxc/nodes/coord/coord2 ... okcreating subdirectories ... okselecting default max_connections ... 100selecting default shared_buffers ... 128MBselecting dynamic shared memory implementation ... posixcreating configuration files ... okrunning bootstrap script ... okperforming post-bootstrap initialization ... creating cluster information ... oksyncing data to disk ... okfreezing database template0 ... okfreezing database template1 ... okfreezing database postgres ... okWARNING: enabling "trust" authentication for local connectionsYou can change this by editing pg_hba.conf or using the option -A, or--auth-local and --auth-host, the next time you run initdb.Success.Done.Starting coordinator master.Starting coordinator master coord1ERROR: target coordinator master coord1 is already running now. Skip initialization.Starting coordinator master coord22019-05-30 21:09:25.562 EDT [2148] LOG: listening on IPv4 address "0.0.0.0", port 54322019-05-30 21:09:25.562 EDT [2148] LOG: listening on IPv6 address "::", port 54322019-05-30 21:09:25.563 EDT [2148] LOG: listening on Unix socket "/tmp/.s.PGSQL.5432"2019-05-30 21:09:25.601 EDT [2149] LOG: database system was shut down at 2019-05-30 21:09:22 EDT2019-05-30 21:09:25.605 EDT [2148] LOG: database system is ready to accept connections2019-05-30 21:09:25.612 EDT [2156] LOG: cluster monitor startedDone.Initialize all the datanode masters.Initialize the datanode master datanode1.Initialize the datanode master datanode2.The files belonging to this database system will be owned by user "postgres".This user must also own the server process.The database cluster will be initialized with locale "en_US.UTF-8".The default database encoding has accordingly been set to "UTF8".The default text search configuration will be set to "english".Data page checksums are disabled.fixing permissions on existing directory /home/postgres/pgxc/nodes/datanode/datanode1 ... okcreating subdirectories ... okselecting default max_connections ... 100selecting default shared_buffers ... 128MBselecting dynamic shared memory implementation ... posixcreating configuration files ... okrunning bootstrap script ... okperforming post-bootstrap initialization ... creating cluster information ... oksyncing data to disk ... okfreezing database template0 ... okfreezing database template1 ... okfreezing database postgres ... okWARNING: enabling "trust" authentication for local connectionsYou can change this by editing pg_hba.conf or using the option -A, or--auth-local and --auth-host, the next time you run initdb.Success.The files belonging to this database system will be owned by user "postgres".This user must also own the server process.The database cluster will be initialized with locale "en_US.UTF-8".The default database encoding has accordingly been set to "UTF8".The default text search configuration will be set to "english".Data page checksums are disabled.fixing permissions on existing directory /home/postgres/pgxc/nodes/datanode/datanode2 ... okcreating subdirectories ... okselecting default max_connections ... 100selecting default shared_buffers ... 128MBselecting dynamic shared memory implementation ... posixcreating configuration files ... okrunning bootstrap script ... okperforming post-bootstrap initialization ... creating cluster information ... oksyncing data to disk ... okfreezing database template0 ... okfreezing database template1 ... okfreezing database postgres ... okWARNING: enabling "trust" authentication for local connectionsYou can change this by editing pg_hba.conf or using the option -A, or--auth-local and --auth-host, the next time you run initdb.Success.Done.Starting all the datanode masters.Starting datanode master datanode1.WARNING: datanode master datanode1 is running now. Skipping.Starting datanode master datanode2.2019-05-30 21:09:33.352 EDT [2404] LOG: listening on IPv4 address "0.0.0.0", port 154322019-05-30 21:09:33.352 EDT [2404] LOG: listening on IPv6 address "::", port 154322019-05-30 21:09:33.355 EDT [2404] LOG: listening on Unix socket "/tmp/.s.PGSQL.15432"2019-05-30 21:09:33.392 EDT [2404] LOG: redirecting log output to logging collector process2019-05-30 21:09:33.392 EDT [2404] HINT: Future log output will appear in directory "pg_log".Done.psql: FATAL: no pg_hba.conf entry for host "192.168.20.132", user "postgres", database "postgres"psql: FATAL: no pg_hba.conf entry for host "192.168.20.132", user "postgres", database "postgres"Done.psql: FATAL: no pg_hba.conf entry for host "192.168.20.132", user "postgres", database "postgres"psql: FATAL: no pg_hba.conf entry for host "192.168.20.132", user "postgres", database "postgres"Done.[postgres@gtm ~]$ pgxc_ctl -c /home/postgres/pgxc_ctl/pgxc_ctl.conf stop all/bin/bashInstalling pgxc_ctl_bash script as /home/postgres/pgxc_ctl/pgxc_ctl_bash.Installing pgxc_ctl_bash script as /home/postgres/pgxc_ctl/pgxc_ctl_bash.Reading configuration using /home/postgres/pgxc_ctl/pgxc_ctl_bash --home /home/postgres/pgxc_ctl --configuration /home/postgres/pgxc_ctl/pgxc_ctl.conf/home/postgres/pgxc_ctl/pgxc_ctl.conf: line 189: $coordExtraConfig: ambiguous redirectFinished reading configuration. PGXC_CTL START Current directory: /home/postgres/pgxc_ctlStopping all the coordinator masters.Stopping coordinator master coord1.Stopping coordinator master coord2.pg_ctl: directory "/home/postgres/pgxc/nodes/coord/coord1" does not existDone.Stopping all the datanode masters.Stopping datanode master datanode1.Stopping datanode master datanode2.pg_ctl: PID file "/home/postgres/pgxc/nodes/datanode/datanode1/postmaster.pid" does not existIs server running?Done.Stop GTM masterwaiting for server to shut down.... doneserver stopped[postgres@gtm ~]$ pgxc_ctl/bin/bashInstalling pgxc_ctl_bash script as /home/postgres/pgxc_ctl/pgxc_ctl_bash.Installing pgxc_ctl_bash script as /home/postgres/pgxc_ctl/pgxc_ctl_bash.Reading configuration using /home/postgres/pgxc_ctl/pgxc_ctl_bash --home /home/postgres/pgxc_ctl --configuration /home/postgres/pgxc_ctl/pgxc_ctl.conf/home/postgres/pgxc_ctl/pgxc_ctl.conf: line 189: $coordExtraConfig: ambiguous redirectFinished reading configuration. PGXC_CTL START Current directory: /home/postgres/pgxc_ctlPGXC monitor allNot running: gtm masterRunning: coordinator master coord1Not running: coordinator master coord2Running: datanode master datanode1Not running: datanode master datanode2PGXC stop coordinator master coord1Stopping coordinator master coord1.pg_ctl: directory "/home/postgres/pgxc/nodes/coord/coord1" does not existDone.PGXC stop datanode master datanode1Stopping datanode master datanode1.pg_ctl: PID file "/home/postgres/pgxc/nodes/datanode/datanode1/postmaster.pid" does not existIs server running?Done.PGXC monitor allNot running: gtm masterRunning: coordinator master coord1Not running: coordinator master coord2Running: datanode master datanode1Not running: datanode master datanode2PGXC monitor allNot running: gtm masterNot running: coordinator master coord1Not running: coordinator master coord2Not running: datanode master datanode1Not running: datanode master datanode2PGXC exit[postgres@gtm ~]$ pgxc_ctl -c /home/postgres/pgxc_ctl/pgxc_ctl.conf init all/bin/bashInstalling pgxc_ctl_bash script as /home/postgres/pgxc_ctl/pgxc_ctl_bash.Installing pgxc_ctl_bash script as /home/postgres/pgxc_ctl/pgxc_ctl_bash.Reading configuration using /home/postgres/pgxc_ctl/pgxc_ctl_bash --home /home/postgres/pgxc_ctl --configuration /home/postgres/pgxc_ctl/pgxc_ctl.conf/home/postgres/pgxc_ctl/pgxc_ctl.conf: line 189: $coordExtraConfig: ambiguous redirectFinished reading configuration. PGXC_CTL START Current directory: /home/postgres/pgxc_ctlInitialize GTM masterERROR: target directory (/home/postgres/pgxc/nodes/gtm) exists and not empty. Skip GTM initilializationDone.Start GTM masterserver startingInitialize all the coordinator masters.Initialize coordinator master coord1.Initialize coordinator master coord2.The files belonging to this database system will be owned by user "postgres".This user must also own the server process.The database cluster will be initialized with locale "en_US.UTF-8".The default database encoding has accordingly been set to "UTF8".The default text search configuration will be set to "english".Data page checksums are disabled.fixing permissions on existing directory /home/postgres/pgxc/nodes/coord/coord1 ... okcreating subdirectories ... okselecting default max_connections ... 100selecting default shared_buffers ... 128MBselecting dynamic shared memory implementation ... posixcreating configuration files ... okrunning bootstrap script ... okperforming post-bootstrap initialization ... creating cluster information ... oksyncing data to disk ... okfreezing database template0 ... okfreezing database template1 ... okfreezing database postgres ... okWARNING: enabling "trust" authentication for local connectionsYou can change this by editing pg_hba.conf or using the option -A, or--auth-local and --auth-host, the next time you run initdb.Success.The files belonging to this database system will be owned by user "postgres".This user must also own the server process.The database cluster will be initialized with locale "en_US.UTF-8".The default database encoding has accordingly been set to "UTF8".The default text search configuration will be set to "english".Data page checksums are disabled.fixing permissions on existing directory /home/postgres/pgxc/nodes/coord/coord2 ... okcreating subdirectories ... okselecting default max_connections ... 100selecting default shared_buffers ... 128MBselecting dynamic shared memory implementation ... posixcreating configuration files ... okrunning bootstrap script ... okperforming post-bootstrap initialization ... creating cluster information ... oksyncing data to disk ... okfreezing database template0 ... okfreezing database template1 ... okfreezing database postgres ... okWARNING: enabling "trust" authentication for local connectionsYou can change this by editing pg_hba.conf or using the option -A, or--auth-local and --auth-host, the next time you run initdb.Success.Done.Starting coordinator master.Starting coordinator master coord1Starting coordinator master coord22019-05-30 21:13:03.998 EDT [25137] LOG: listening on IPv4 address "0.0.0.0", port 54322019-05-30 21:13:03.998 EDT [25137] LOG: listening on IPv6 address "::", port 54322019-05-30 21:13:04.000 EDT [25137] LOG: listening on Unix socket "/tmp/.s.PGSQL.5432"2019-05-30 21:13:04.038 EDT [25138] LOG: database system was shut down at 2019-05-30 21:13:00 EDT2019-05-30 21:13:04.042 EDT [25137] LOG: database system is ready to accept connections2019-05-30 21:13:04.049 EDT [25145] LOG: cluster monitor started2019-05-30 21:13:04.020 EDT [2730] LOG: listening on IPv4 address "0.0.0.0", port 54322019-05-30 21:13:04.020 EDT [2730] LOG: listening on IPv6 address "::", port 54322019-05-30 21:13:04.021 EDT [2730] LOG: listening on Unix socket "/tmp/.s.PGSQL.5432"2019-05-30 21:13:04.057 EDT [2731] LOG: database system was shut down at 2019-05-30 21:13:00 EDT2019-05-30 21:13:04.061 EDT [2730] LOG: database system is ready to accept connections2019-05-30 21:13:04.062 EDT [2738] LOG: cluster monitor startedDone.Initialize all the datanode masters.Initialize the datanode master datanode1.Initialize the datanode master datanode2.The files belonging to this database system will be owned by user "postgres".This user must also own the server process.The database cluster will be initialized with locale "en_US.UTF-8".The default database encoding has accordingly been set to "UTF8".The default text search configuration will be set to "english".Data page checksums are disabled.fixing permissions on existing directory /home/postgres/pgxc/nodes/datanode/datanode1 ... okcreating subdirectories ... okselecting default max_connections ... 100selecting default shared_buffers ... 128MBselecting dynamic shared memory implementation ... posixcreating configuration files ... okrunning bootstrap script ... okperforming post-bootstrap initialization ... creating cluster information ... oksyncing data to disk ... okfreezing database template0 ... okfreezing database template1 ... okfreezing database postgres ... okWARNING: enabling "trust" authentication for local connectionsYou can change this by editing pg_hba.conf or using the option -A, or--auth-local and --auth-host, the next time you run initdb.Success.The files belonging to this database system will be owned by user "postgres".This user must also own the server process.The database cluster will be initialized with locale "en_US.UTF-8".The default database encoding has accordingly been set to "UTF8".The default text search configuration will be set to "english".Data page checksums are disabled.fixing permissions on existing directory /home/postgres/pgxc/nodes/datanode/datanode2 ... okcreating subdirectories ... okselecting default max_connections ... 100selecting default shared_buffers ... 128MBselecting dynamic shared memory implementation ... posixcreating configuration files ... okrunning bootstrap script ... okperforming post-bootstrap initialization ... creating cluster information ... oksyncing data to disk ... okfreezing database template0 ... okfreezing database template1 ... okfreezing database postgres ... okWARNING: enabling "trust" authentication for local connectionsYou can change this by editing pg_hba.conf or using the option -A, or--auth-local and --auth-host, the next time you run initdb.Success.Done.Starting all the datanode masters.Starting datanode master datanode1.Starting datanode master datanode2.2019-05-30 21:13:12.077 EDT [25392] LOG: listening on IPv4 address "0.0.0.0", port 154322019-05-30 21:13:12.077 EDT [25392] LOG: listening on IPv6 address "::", port 154322019-05-30 21:13:12.079 EDT [25392] LOG: listening on Unix socket "/tmp/.s.PGSQL.15432"2019-05-30 21:13:12.114 EDT [25392] LOG: redirecting log output to logging collector process2019-05-30 21:13:12.114 EDT [25392] HINT: Future log output will appear in directory "pg_log".2019-05-30 21:13:12.079 EDT [2985] LOG: listening on IPv4 address "0.0.0.0", port 154322019-05-30 21:13:12.079 EDT [2985] LOG: listening on IPv6 address "::", port 154322019-05-30 21:13:12.081 EDT [2985] LOG: listening on Unix socket "/tmp/.s.PGSQL.15432"2019-05-30 21:13:12.117 EDT [2985] LOG: redirecting log output to logging collector process2019-05-30 21:13:12.117 EDT [2985] HINT: Future log output will appear in directory "pg_log".Done.psql: FATAL: no pg_hba.conf entry for host "192.168.20.132", user "postgres", database "postgres"psql: FATAL: no pg_hba.conf entry for host "192.168.20.132", user "postgres", database "postgres"Done.psql: FATAL: no pg_hba.conf entry for host "192.168.20.132", user "postgres", database "postgres"psql: FATAL: no pg_hba.conf entry for host "192.168.20.132", user "postgres", database "postgres"Done. 启动 pgxc_ctl -c /home/postgres/pgxc_ctl/pgxc_ctl.conf start all 关闭 pgxc_ctl -c /home/postgres/pgxc_ctl/pgxc_ctl.conf stop all 查看集群状态 [postgres@gtm ~]$ pgxc_ctl monitor all/bin/bashInstalling pgxc_ctl_bash script as /home/postgres/pgxc_ctl/pgxc_ctl_bash.Installing pgxc_ctl_bash script as /home/postgres/pgxc_ctl/pgxc_ctl_bash.Reading configuration using /home/postgres/pgxc_ctl/pgxc_ctl_bash --home /home/postgres/pgxc_ctl --configuration /home/postgres/pgxc_ctl/pgxc_ctl.conf/home/postgres/pgxc_ctl/pgxc_ctl.conf: line 189: $coordExtraConfig: ambiguous redirectFinished reading configuration. PGXC_CTL START Current directory: /home/postgres/pgxc_ctlRunning: gtm masterRunning: coordinator master coord1Running: coordinator master coord2Running: datanode master datanode1Running: datanode master datanode2 配置集群信息 分别在数据节点、协调器节点上分别执行以下命令: 注:本节点只执行修改操作即可(alert node),其他节点执行创建命令(create node)。因为本节点已经包含本节点的信息。 create node coord1 with (type=coordinator,host=xl1, port=5432);create node coord2 with (type=coordinator,host=xl2, port=5432);alter node coord1 with (type=coordinator,host=xl1, port=5432);alter node coord2 with (type=coordinator,host=xl2, port=5432);create node datanode1 with (type=datanode, host=xl1,port=15432,primary=true,PREFERRED);create node datanode2 with (type=datanode, host=xl2,port=15432);alter node datanode1 with (type=datanode, host=xl1,port=15432,primary=true,PREFERRED);alter node datanode2 with (type=datanode, host=xl2,port=15432);select pgxc_pool_reload(); 分别登陆数据节点、协调器节点验证 postgres= select from pgxc_node;node_name | node_type | node_port | node_host | nodeis_primary | nodeis_preferred | node_id-----------+-----------+-----------+-----------+----------------+------------------+-------------coord1 | C | 5432 | xl1 | f | f | 1885696643coord2 | C | 5432 | xl2 | f | f | -1197102633datanode2 | D | 15432 | xl2 | f | f | -905831925datanode1 | D | 15432 | xl1 | t | f | 888802358(4 rows) 测试 插入数据 在数据节点1,执行相关操作。 通过协调器端口登录PG [postgres@xl1 ~]$ psql -p 5432psql (PGXL 10r1.1, based on PG 10.6 (Postgres-XL 10r1.1))Type "help" for help.postgres= create database lei;CREATE DATABASEpostgres= \c lei;You are now connected to database "lei" as user "postgres".lei= create table test1(id int,name text);CREATE TABLElei= insert into test1(id,name) select generate_series(1,8),'测试';INSERT 0 8lei= select from test1;id | name----+------1 | 测试2 | 测试5 | 测试6 | 测试8 | 测试3 | 测试4 | 测试7 | 测试(8 rows) 注:默认创建的表为分布式表,也就是每个数据节点值存储表的部分数据。关于表类型具体说明,下面有说明。 通过15432端口登录数据节点,查看数据 有5条数据 [postgres@xl1 ~]$ psql -p 15432psql (PGXL 10r1.1, based on PG 10.6 (Postgres-XL 10r1.1))Type "help" for help.postgres= \c lei;You are now connected to database "lei" as user "postgres".lei= select from test1;id | name----+------1 | 测试2 | 测试5 | 测试6 | 测试8 | 测试(5 rows) 登录到节点2,查看数据 有3条数据 [postgres@xl2 ~]$ psql -p15432psql (PGXL 10r1.1, based on PG 10.6 (Postgres-XL 10r1.1))Type "help" for help.postgres= \c lei;You are now connected to database "lei" as user "postgres".lei= select from test1;id | name----+------3 | 测试4 | 测试7 | 测试(3 rows) 两个节点的数据加起来整个8条,没有问题。 至此Postgre-XL集群搭建完成。 创建数据库、表时可能会出现以下错误: ERROR: Failed to get pooled connections 是因为pg_hba.conf配置不对,所有节点加上host all all 192.168.20.0/0 trust并重启集群即可。 ERROR: No Datanode defined in cluster 首先确认是否创建了数据节点,也就是create node相关的命令。如果创建了则执行select pgxc_pool_reload();使其生效即可。 集群管理与应用 表类型说明 REPLICATION表:各个datanode节点中,表的数据完全相同,也就是说,插入数据时,会分别在每个datanode节点插入相同数据。读数据时,只需要读任意一个datanode节点上的数据。 建表语法: CREATE TABLE repltab (col1 int, col2 int) DISTRIBUTE BY REPLICATION; DISTRIBUTE :会将插入的数据,按照拆分规则,分配到不同的datanode节点中存储,也就是sharding技术。每个datanode节点只保存了部分数据,通过coordinate节点可以查询完整的数据视图。 CREATE TABLE disttab(col1 int, col2 int, col3 text) DISTRIBUTE BY HASH(col1); 模拟数据插入 任意登录一个coordinate节点进行建表操作 [postgres@gtm ~]$ psql -h xl1 -p 5432 -U postgrespostgres= INSERT INTO disttab SELECT generate_series(1,100), generate_series(101, 200), 'foo';INSERT 0 100postgres= INSERT INTO repltab SELECT generate_series(1,100), generate_series(101, 200);INSERT 0 100 查看数据分布结果: DISTRIBUTE表分布结果 postgres= SELECT xc_node_id, count() FROM disttab GROUP BY xc_node_id;xc_node_id | count ------------+-------1148549230 | 42-927910690 | 58(2 rows) REPLICATION表分布结果 postgres= SELECT count() FROM repltab;count -------100(1 row) 查看另一个datanode2中repltab表结果 [postgres@datanode2 pgxl9.5]$ psql -p 15432psql (PGXL 10r1.1, based on PG 10.6 (Postgres-XL 10r1.1))Type "help" for help.postgres= SELECT count() FROM repltab;count -------100(1 row) 结论:REPLICATION表中,datanode1,datanode2中表是全部数据,一模一样。而DISTRIBUTE表,数据散落近乎平均分配到了datanode1,datanode2节点中。 新增数据节点与数据重分布 在线新增节点、并重新分布数据。 新增datanode节点 在gtm集群管理节点上执行pgxc_ctl命令 [postgres@gtm ~]$ pgxc_ctl/bin/bashInstalling pgxc_ctl_bash script as /home/postgres/pgxc_ctl/pgxc_ctl_bash.Installing pgxc_ctl_bash script as /home/postgres/pgxc_ctl/pgxc_ctl_bash.Reading configuration using /home/postgres/pgxc_ctl/pgxc_ctl_bash --home /home/postgres/pgxc_ctl --configuration /home/postgres/pgxc_ctl/pgxc_ctl.confFinished reading configuration. PGXC_CTL START Current directory: /home/postgres/pgxc_ctlPGXC 在服务器xl3上,新增一个master角色的datanode节点,名称是datanode3 端口号暂定5430,pool master暂定6669 ,指定好数据目录位置,从两个节点升级到3个节点,之后要写3个none none应该是datanodeSpecificExtraConfig或者datanodeSpecificExtraPgHba配置PGXC add datanode master datanode3 xl3 15432 6671 /home/postgres/pgxc/nodes/datanode/datanode3 none none none 等待新增完成后,查询集群节点状态: postgres= select from pgxc_node;node_name | node_type | node_port | node_host | nodeis_primary | nodeis_preferred | node_id-----------+-----------+-----------+-----------+----------------+------------------+-------------datanode1 | D | 15432 | xl1 | t | f | 888802358datanode2 | D | 15432 | xl2 | f | f | -905831925datanode3 | D | 15432 | xl3 | f | f | -705831925coord1 | C | 5432 | xl1 | f | f | 1885696643coord2 | C | 5432 | xl2 | f | f | -1197102633(4 rows) 节点新增完毕 数据重新分布 由于新增节点后无法自动完成数据重新分布,需要手动操作。 DISTRIBUTE表分布在了node1,node2节点上,如下: postgres= SELECT xc_node_id, count() FROM disttab GROUP BY xc_node_id;xc_node_id | count ------------+-------1148549230 | 42-927910690 | 58(2 rows) 新增一个节点后,将sharding表数据重新分配到三个节点上,将repl表复制到新节点 重分布sharding表postgres= ALTER TABLE disttab ADD NODE (datanode3);ALTER TABLE 复制数据到新节点postgres= ALTER TABLE repltab ADD NODE (datanode3);ALTER TABLE 查看新的数据分布: postgres= SELECT xc_node_id, count() FROM disttab GROUP BY xc_node_id;xc_node_id | count ------------+--------700122826 | 36-927910690 | 321148549230 | 32(3 rows) 登录datanode3(新增的时候,放在了xl3服务器上,端口15432)节点查看数据: [postgres@gtm ~]$ psql -h xl3 -p 15432 -U postgrespsql (PGXL 10r1.1, based on PG 10.6 (Postgres-XL 10r1.1))Type "help" for help.postgres= select count() from repltab;count -------100(1 row) 很明显,通过 ALTER TABLE tt ADD NODE (dn)命令,可以将DISTRIBUTE表数据重新分布到新节点,重分布过程中会中断所有事务。可以将REPLICATION表数据复制到新节点。 从datanode节点中回收数据 postgres= ALTER TABLE disttab DELETE NODE (datanode3);ALTER TABLEpostgres= ALTER TABLE repltab DELETE NODE (datanode3);ALTER TABLE 删除数据节点 Postgresql-XL并没有检查将被删除的datanode节点是否有replicated/distributed表的数据,为了数据安全,在删除之前需要检查下被删除节点上的数据,有数据的话,要回收掉分配到其他节点,然后才能安全删除。删除数据节点分为四步骤: 1.查询要删除节点dn3的oid postgres= SELECT oid, FROM pgxc_node;oid | node_name | node_type | node_port | node_host | nodeis_primary | nodeis_preferred | node_id -------+-----------+-----------+-----------+-----------+----------------+------------------+-------------11819 | coord1 | C | 5432 | datanode1 | f | f | 188569664316384 | coord2 | C | 5432 | datanode2 | f | f | -119710263316385 | node1 | D | 5433 | datanode1 | f | t | 114854923016386 | node2 | D | 5433 | datanode2 | f | f | -92791069016397 | dn3 | D | 5430 | datanode1 | f | f | -700122826(5 rows) 2.查询dn3对应的oid中是否有数据 testdb= SELECT FROM pgxc_class WHERE nodeoids::integer[] @> ARRAY[16397];pcrelid | pclocatortype | pcattnum | pchashalgorithm | pchashbuckets | nodeoids ---------+---------------+----------+-----------------+---------------+-------------------16388 | H | 1 | 1 | 4096 | 16397 16385 1638616394 | R | 0 | 0 | 0 | 16397 16385 16386(2 rows) 3.有数据的先回收数据 postgres= ALTER TABLE disttab DELETE NODE (dn3);ALTER TABLEpostgres= ALTER TABLE repltab DELETE NODE (dn3);ALTER TABLEpostgres= SELECT FROM pgxc_class WHERE nodeoids::integer[] @> ARRAY[16397];pcrelid | pclocatortype | pcattnum | pchashalgorithm | pchashbuckets | nodeoids ---------+---------------+----------+-----------------+---------------+----------(0 rows) 4.安全删除dn3 PGXC$ remove datanode master dn3 clean 故障节点FAILOVER 1.查看当前集群状态 [postgres@gtm ~]$ psql -h xl1 -p 5432psql (PGXL 10r1.1, based on PG 10.6 (Postgres-XL 10r1.1))Type "help" for help.postgres= SELECT oid, FROM pgxc_node;oid | node_name | node_type | node_port | node_host | nodeis_primary | nodeis_preferred | node_id-------+-----------+-----------+-----------+-----------+----------------+------------------+-------------11739 | coord1 | C | 5432 | xl1 | f | f | 188569664316384 | coord2 | C | 5432 | xl2 | f | f | -119710263316387 | datanode2 | D | 15432 | xl2 | f | f | -90583192516388 | datanode1 | D | 15432 | xl1 | t | t | 888802358(4 rows) 2.模拟datanode1节点故障 直接关闭即可 PGXC stop -m immediate datanode master datanode1Stopping datanode master datanode1.Done. 3.测试查询 只要查询涉及到datanode1上的数据,那么该查询就会报错 postgres= SELECT xc_node_id, count() FROM disttab GROUP BY xc_node_id;WARNING: failed to receive file descriptors for connectionsERROR: Failed to get pooled connectionsHINT: This may happen because one or more nodes are currently unreachable, either because of node or network failure.Its also possible that the target node may have hit the connection limit or the pooler is configured with low connections.Please check if all nodes are running fine and also review max_connections and max_pool_size configuration parameterspostgres= SELECT xc_node_id, FROM disttab WHERE col1 = 3;xc_node_id | col1 | col2 | col3------------+------+------+-------905831925 | 3 | 103 | foo(1 row) 测试发现,查询范围如果涉及到故障的node1节点,会报错,而查询的数据范围不在node1上的话,仍然可以查询。 4.手动切换 要想切换,必须要提前配置slave节点。 PGXC$ failover datanode node1 切换完成后,查询集群 postgres= SELECT oid, FROM pgxc_node;oid | node_name | node_type | node_port | node_host | nodeis_primary | nodeis_preferred | node_id -------+-----------+-----------+-----------+-----------+----------------+------------------+-------------11819 | coord1 | C | 5432 | datanode1 | f | f | 188569664316384 | coord2 | C | 5432 | datanode2 | f | f | -119710263316386 | node2 | D | 15432 | datanode2 | f | f | -92791069016385 | node1 | D | 15433 | datanode2 | f | t | 1148549230(4 rows) 发现datanode1节点的ip和端口都已经替换为配置的slave了。 本篇文章为转载内容。原文链接:https://blog.csdn.net/qianglei6077/article/details/94379331。 该文由互联网用户投稿提供,文中观点代表作者本人意见,并不代表本站的立场。 作为信息平台,本站仅提供文章转载服务,并不拥有其所有权,也不对文章内容的真实性、准确性和合法性承担责任。 如发现本文存在侵权、违法、违规或事实不符的情况,请及时联系我们,我们将第一时间进行核实并删除相应内容。
2023-01-30 11:09:03
94
转载
建站模板下载
...统功能,方便用户在线查询影片信息并进行快速购票操作。同时,模板还兼顾了展示更多台网平台信息的需求,是搭建专业、高效电影售票服务平台的理想选择。 点我下载 文件大小:1.51 MB 您将下载一个资源包,该资源包内部文件的目录结构如下: 本网站提供模板下载功能,旨在帮助广大用户在工作学习中提升效率、节约时间。 本网站的下载内容来自于互联网。如您发现任何侵犯您权益的内容,请立即告知我们,我们将迅速响应并删除相关内容。 免责声明:站内所有资源仅供个人学习研究及参考之用,严禁将这些资源应用于商业场景。 若擅自商用导致的一切后果,由使用者承担责任。
2023-05-02 14:56:36
46
本站
建站模板下载
...便捷的在线服务与信息查询功能,帮助用户快速搭建具有官方权威感的保险业务平台,实现更好的用户体验与品牌传播效果。 点我下载 文件大小:1.40 MB 您将下载一个资源包,该资源包内部文件的目录结构如下: 本网站提供模板下载功能,旨在帮助广大用户在工作学习中提升效率、节约时间。 本网站的下载内容来自于互联网。如您发现任何侵犯您权益的内容,请立即告知我们,我们将迅速响应并删除相关内容。 免责声明:站内所有资源仅供个人学习研究及参考之用,严禁将这些资源应用于商业场景。 若擅自商用导致的一切后果,由使用者承担责任。
2023-01-15 09:10:40
126
本站
建站模板下载
...便捷的政务服务与信息查询体验,便于政府部门快速构建专业且功能齐全的政务服务平台。 点我下载 文件大小:385.35 KB 您将下载一个资源包,该资源包内部文件的目录结构如下: 本网站提供模板下载功能,旨在帮助广大用户在工作学习中提升效率、节约时间。 本网站的下载内容来自于互联网。如您发现任何侵犯您权益的内容,请立即告知我们,我们将迅速响应并删除相关内容。 免责声明:站内所有资源仅供个人学习研究及参考之用,严禁将这些资源应用于商业场景。 若擅自商用导致的一切后果,由使用者承担责任。
2023-06-08 09:39:20
162
本站
建站模板下载
...修服务板块,便于客户查询与预约。同时,它还配备了功能齐全的表单组件,方便用户提交反馈与需求。整体设计兼顾美观与实用性,是打造专业汽修服务网站的理想选择。 点我下载 文件大小:5.02 MB 您将下载一个资源包,该资源包内部文件的目录结构如下: 本网站提供模板下载功能,旨在帮助广大用户在工作学习中提升效率、节约时间。 本网站的下载内容来自于互联网。如您发现任何侵犯您权益的内容,请立即告知我们,我们将迅速响应并删除相关内容。 免责声明:站内所有资源仅供个人学习研究及参考之用,严禁将这些资源应用于商业场景。 若擅自商用导致的一切后果,由使用者承担责任。
2023-02-08 10:27:18
127
本站
建站模板下载
...进行深度的数据录入与查询操作。基于HTML技术开发,易于定制与扩展,特别适用于搭建后台管理系统,实现对医院各类病人信息的全面、便捷管理。 点我下载 文件大小:3.43 MB 您将下载一个资源包,该资源包内部文件的目录结构如下: 本网站提供模板下载功能,旨在帮助广大用户在工作学习中提升效率、节约时间。 本网站的下载内容来自于互联网。如您发现任何侵犯您权益的内容,请立即告知我们,我们将迅速响应并删除相关内容。 免责声明:站内所有资源仅供个人学习研究及参考之用,严禁将这些资源应用于商业场景。 若擅自商用导致的一切后果,由使用者承担责任。
2023-06-18 13:27:06
311
本站
建站模板下载
...、学科介绍、教师信息查询等核心功能页面,共7个HTML文件,适用于搭建中文官方网站,提供简洁大气的界面和便捷的信息展示方式,易于部署与定制,助力提升学校线上形象与信息服务能力。 点我下载 文件大小:1.24 MB 您将下载一个资源包,该资源包内部文件的目录结构如下: 本网站提供模板下载功能,旨在帮助广大用户在工作学习中提升效率、节约时间。 本网站的下载内容来自于互联网。如您发现任何侵犯您权益的内容,请立即告知我们,我们将迅速响应并删除相关内容。 免责声明:站内所有资源仅供个人学习研究及参考之用,严禁将这些资源应用于商业场景。 若擅自商用导致的一切后果,由使用者承担责任。
2023-11-22 15:26:23
67
本站
建站模板下载
...司官方网站,实现机票查询、预订及管理功能。该模板具有高度自适应性,可在不同设备上完美呈现,方便用户随时随地进行机票预订操作,是提升企业形象与优化用户体验的理想选择。 点我下载 文件大小:1.79 MB 您将下载一个资源包,该资源包内部文件的目录结构如下: 本网站提供模板下载功能,旨在帮助广大用户在工作学习中提升效率、节约时间。 本网站的下载内容来自于互联网。如您发现任何侵犯您权益的内容,请立即告知我们,我们将迅速响应并删除相关内容。 免责声明:站内所有资源仅供个人学习研究及参考之用,严禁将这些资源应用于商业场景。 若擅自商用导致的一切后果,由使用者承担责任。
2023-11-11 08:02:24
214
本站
建站模板下载
...现突出。它整合了课程查询、在线学习、机构介绍等功能模块,满足教育企业多元化需求,助力搭建专业且全面的在线教育平台,实现更多元、高效的教育资源分享与学习体验。 点我下载 文件大小:2.73 MB 您将下载一个资源包,该资源包内部文件的目录结构如下: 本网站提供模板下载功能,旨在帮助广大用户在工作学习中提升效率、节约时间。 本网站的下载内容来自于互联网。如您发现任何侵犯您权益的内容,请立即告知我们,我们将迅速响应并删除相关内容。 免责声明:站内所有资源仅供个人学习研究及参考之用,严禁将这些资源应用于商业场景。 若擅自商用导致的一切后果,由使用者承担责任。
2023-03-30 23:34:00
94
本站
建站模板下载
...、在线下单及物流信息查询等功能模块,充分满足企业形象展示与业务推广的需求,是塑造专业、高效品牌形象的理想选择。 点我下载 文件大小:2.26 MB 您将下载一个资源包,该资源包内部文件的目录结构如下: 本网站提供模板下载功能,旨在帮助广大用户在工作学习中提升效率、节约时间。 本网站的下载内容来自于互联网。如您发现任何侵犯您权益的内容,请立即告知我们,我们将迅速响应并删除相关内容。 免责声明:站内所有资源仅供个人学习研究及参考之用,严禁将这些资源应用于商业场景。 若擅自商用导致的一切后果,由使用者承担责任。
2023-11-02 23:26:00
86
本站
站内搜索
用于搜索本网站内部文章,支持栏目切换。
知识学习
实践的时候请根据实际情况谨慎操作。
随机学习一条linux命令:
head -n 10 file.txt
- 显示文件开头的10行内容。
推荐内容
推荐本栏目内的其它文章,看看还有哪些文章让你感兴趣。
2023-04-28
2023-08-09
2023-06-18
2023-04-14
2023-02-18
2023-04-17
2024-01-11
2023-10-03
2023-09-09
2023-06-13
2023-08-07
2023-03-11
历史内容
快速导航到对应月份的历史文章列表。
随便看看
拉到页底了吧,随便看看还有哪些文章你可能感兴趣。
时光飞逝
"流光容易把人抛,红了樱桃,绿了芭蕉。"