首页> 外国专利> DATA QUERY METHOD IN CROSSING-PARTITION DATABASE, AND CROSSING-PARTITION QUERY DEVICE

DATA QUERY METHOD IN CROSSING-PARTITION DATABASE, AND CROSSING-PARTITION QUERY DEVICE

机译:跨部门数据库中的数据查询方法及跨部门查询设备

摘要

The present invention discloses a method and an apparatus for querying data in cross-shard databases. The method includes: receiving a query request, where the query request includes a query condition; querying statistics information of respective shard databases in which two tables used in an association operation are located; sending, according to the statistics information and the query condition, a driving table query request to a shard database in which a driving table is located, and receiving a first query result set returned by the shard database in which the driving table is located, where one table of the two tables used in the association operation is the driving table, and the other table is a non-driving table; deduplicating association field values in the first query result set, and sending a result set delivery request and deduplicated association field values to a shard database in which the non-driving table is located; and sending a non-driving table query request to the shard database in which the non-driving table is located; and receiving a second query result set returned by the shard database in which the non-driving table is located. Efficiency of querying data in cross-shard databases is improved.
机译:本发明公开了一种查询跨分片数据库中数据的方法和装置。该方法包括:接收查询请求,所述查询请求中包括查询条件;查询关联操作中使用的两个表所在的各个分片数据库的统计信息;根据统计信息和查询条件,向驾驶表所在的分片数据库发送驾驶表查询请求,并接收所述驾驶表所在的分片数据库返回的第一查询结果集,在关联操作中使用的两个表中的一个表是驱动表,另一个表是非驱动表;对所述第一查询结果集中的关联字段值进行去重,并将结果集传递请求和去重后的关联字段值发送至所述非驱动表所在的分片数据库;向所述非驱动表所在的分片数据库发送非驱动表查询请求;接收非驱动表所在的分片数据库返回的第二查询结果集。跨分片数据库中查询数据的效率得到提高。

著录项

相似文献

  • 专利
  • 外文文献
  • 中文文献
获取专利

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号