Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Example Analysis of Spatial query in oracle

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly introduces the example analysis of spatial query in oracle, which is very detailed and has certain reference value. Friends who are interested must finish it!

~ ORACLE to see how much space is occupied by a user ~

SELECT OWNER, TABLESPACE_NAME, ROUND (SUM (BYTES) / 1024 / 1024, 2) "USED (M)"

FROM DBA_SEGMENTS

GROUP BY OWNER, TABLESPACE_NAME

ORDER BY SUM (BYTES) DESC

~ query the space occupied by a user in the following table ~

Select OWNER, t.segment_name, t.segment_type, sum (t.bytes / 1024 / 1024) mmm

From dba_segments t

Where t.owner = 'xxx'

And t.segmentationtypewritten table

Group by OWNER, t.segment_name, t.segment_type

Order by mmm desc

~ High water mark of data file ~

Select a.file#

A.name

A.bytes / 1024 / 1024 CurrentMB

Ceil (HWM * a.block_size) / 1024 / 1024 ResizeTo

(a.bytes-HWM * a.block_size) / 1024 / 1024 ReleaseMB

'alter database datafile''| | a.name | |''resize' | |

Ceil (HWM * a.block_size / 1024 / 1024) | | 'Mash' ResizeCMD

From v$datafile a

(select file_id, max (block_id + blocks-1) HWM

From dba_extents

Group by file_id) b

Where a.file# = b.file_id (+)

And (a.bytes-HWM * block_size) > 0

Order by 5

The above is all the contents of the article "sample Analysis of Spatial queries in oracle". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report