如何优化具有多个条件和内部联接的SQL查询

时间:2018-01-11 23:57:34

标签: sql oracle

如何优化下面的SQL查询?这需要太多时间。这用于从非常大的天文表(几亿个对象)中进行选择,并且此查询运行超过12小时,这超过了最大允许查询时间。似乎通过附加条件添加更多限制根本没有帮助。

非常感谢您的帮助!

root
 |-- Insdc: string (nullable = true)
 |-- LastMetaUpdate: string (nullable = true)
 |-- LastUpdate: string (nullable = true)
 |-- Published: string (nullable = true)
 |-- Received: string (nullable = true)
 |-- ReplacedBy: string (nullable = true)
 |-- Status: string (nullable = true)
 |-- Type: string (nullable = true)
 |-- accession: string (nullable = true)
 |-- alias: string (nullable = true)
 |-- attributes: array (nullable = true)
 |    |-- element: struct (containsNull = true)
 |    |    |-- tag: string (nullable = true)
 |    |    |-- value: string (nullable = true)
 |-- center_name: string (nullable = true)
 |-- design_description: string (nullable = true)
 |-- geo_accession: string (nullable = true)
 |-- instrument_model: string (nullable = true)
 |-- library_construction_protocol: string (nullable = true)
 |-- library_name: string (nullable = true)
 |-- library_selection: string (nullable = true)
 |-- library_source: string (nullable = true)
 |-- library_strategy: string (nullable = true)
 |-- paired: boolean (nullable = true)
 |-- platform: string (nullable = true)
 |-- read_spec: array (nullable = true)
 |    |-- element: struct (containsNull = true)
 |    |    |-- base_coord: long (nullable = true)
 |    |    |-- read_class: string (nullable = true)
 |    |    |-- read_index: long (nullable = true)
 |    |    |-- read_type: string (nullable = true)
 |-- sample_accession: string (nullable = true)
 |-- spot_length: long (nullable = true)
 |-- study_accession: string (nullable = true)
 |-- tags: array (nullable = true)
 |    |-- element: string (containsNull = true)
 |-- title: string (nullable = true)
 |-- accession: string (nullable = true)
 |-- study: struct (nullable = true)
 |    |-- BioProject: string (nullable = true)
 |    |-- Insdc: string (nullable = true)
 |    |-- LastMetaUpdate: string (nullable = true)
 |    |-- LastUpdate: string (nullable = true)
 |    |-- Published: string (nullable = true)
 |    |-- Received: string (nullable = true)
 |    |-- ReplacedBy: string (nullable = true)
 |    |-- Status: string (nullable = true)
 |    |-- Type: string (nullable = true)
 |    |-- abstract: string (nullable = true)
 |    |-- accession: string (nullable = true)
 |    |-- alias: string (nullable = true)
 |    |-- attributes: array (nullable = true)
 |    |    |-- element: struct (containsNull = true)
 |    |    |    |-- tag: string (nullable = true)
 |    |    |    |-- value: string (nullable = true)
 |    |-- dbGaP: string (nullable = true)
 |    |-- description: string (nullable = true)
 |    |-- external_id: struct (nullable = true)
 |    |    |-- id: string (nullable = true)
 |    |    |-- namespace: string (nullable = true)
 |    |-- submitter_id: struct (nullable = true)
 |    |    |-- id: string (nullable = true)
 |    |    |-- namespace: string (nullable = true)
 |    |-- tags: array (nullable = true)
 |    |    |-- element: string (containsNull = true)
 |    |-- title: string (nullable = true)

0 个答案:

没有答案