• truncate 空间不释放问题


    SQL> set linesize 200

    SQL> select segment_name, sum(bytes / 1024 / 1024/1024)

      from dba_segments

      where segment_name='T_PM_DEBIT_CARD'

      group by segment_name;  2    3    4 

     

    SEGMENT_NAME                                                                 SUM(BYTES/1024/1024/1024)

    --------------------------------------------------------------------------------- -------------------------

    T_PM_DEBIT_CARD                                                                  16.1968994

     truncate table T_PM_DEBIT_CARD;

    SQL> select segment_name, sum(bytes / 1024 / 1024 / 1024)

      from dba_segments

     where segment_name = 'T_PM_DEBIT_CARD'

     group by segment_name;  2    3    4 

     

    SEGMENT_NAME                                    SUM(BYTES/1024/1024/1024)

    --------------------------------------------------------------------------------- -------------------------

    T_PM_DEBIT_CARD                                         .836181641

    为什么还有800M呢?

    SQL> alter table T_PM_DEBIT_CARD deallocate unused keep 0;

     

    Table altered.

     

    SQL> select segment_name, sum(bytes / 1024 / 1024 / 1024)

      from dba_segments

     where segment_name = 'T_PM_DEBIT_CARD'

     group by segment_name;  2    3    4 

     

    SEGMENT_NAME                                    SUM(BYTES/1024/1024/1024)

    --------------------------------------------------------------------------------- -------------------------

    T_PM_DEBIT_CARD                                         .051513672

    是因为initial 分配的缘故.

  • 相关阅读:
    Web应用程序使用Hibernate
    Hibernate使用注释
    Hibernate入门程序
    Hibernate体系结构
    Spring MVC文件上传教程
    Spring MVC配置静态资源和资源包教程
    Spring MVC4使用Servlet3 MultiPartConfigElement文件上传实例
    Spring4 MVC文件下载实例
    Spring4 MVC+Hibernate4 Many-to-many连接表+MySQL+Maven实例
    Spring4 MVC+Hibernate4+MySQL+Maven使用注解集成实例
  • 原文地址:https://www.cnblogs.com/zhaoyangjian724/p/3797954.html
Copyright © 2020-2023  润新知