Background Image

FORUM

조회 수 753 추천 수 0 댓글 5
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄


* 질문 등록 시 다음의 내용을 꼭 기입하여 주세요.

OS
Linux 64Bit
CUBRID Ver.
CUBRID 10.2 (10.2.7.8896-cebe4e9) (64bit release build for Linux) (Jan 26 2022 11:35:52)
CUBRID TOOL Ver.
SQLGate for CUBRID Developer 9.9.8.0
응용 환경(API)
java, php, odbc 등 입력


* CUBRID 응용 오류, SQL 오류 또는 SQL 튜닝 관련된 문의는 반드시 다음의 내용을 추가해 주세요. 비밀글이나 비밀 댓글도 가능합니다.
* 저희가 상황을 이해하고, 재현이 가능해야 알 수 있는 문제들이 많습니다. 가능한 정보/정황들을 부탁합니다.

 

에러 내용 및 재현 방법 재현 가능한 Source와 SQL
관련 테이블(인덱스, 키정보 포함) 정보 CUBRID 홈 디렉토리 아래 log 디렉토리 압축


-------------- 아래에 질문 사항을 기입해 주세요. ------------------------------------------------------------------------
특정 Table에 대한 SQL 문 실행 시 시간이 너무 오래 걸리고 응답이 없어,  데이타의 건수 조차 확인할 수 없습니다.
그래서 해당 table에 대한 drop, truncate를 시도해 봐도 5분 이상 응답이 없습니다.
문제제의 원인과 해결 방안이 무엇인가요?

 

  • ?
    오명환 2022.08.30 08:57
    운영중인 DB 환경 설정 및 워크로드를 몰라서 정확한 가이드는 힘들 것 같습니다.

    우선 의심해볼 수 있는 것은 lock (레코드, 테이블)에 의한 대기입니다.
    cubrid lockdb db명으로 해당 테이블 및 레코드에 lock이 발생하는지 확인해보세요.
    자세한 내용은 매뉴얼(https://www.cubrid.org/manual/ko/10.2/admin/admin_utils.html#lockdb)를 참고하세요.

    그리고, 다음 질의로 테이터의 건수를 count(*)로 세지 않고 heap 정보를 통해 확인할 수 있습니다.
    show heap header of table명
    해당 SQL는 dba 사용자에서만 가능합니다.
    자세한 내용은 매뉴얼(https://www.cubrid.org/manual/ko/10.2/sql/query/show.html)의 진단(diagnostics)를 참고하세요.
  • ?
    steve 2022.08.30 13:12

    해당 table은 drop 하였고 다른 table을 rtruncate 하고 있습니다.

    1시간 넘게 기다렸으나 truncate가 되지 않고 있습니다.

    table record 수와 lock dump 보냅니다.

     

    1. record 수

     

    SHOW heap header OF charge_trans;

    estimates_num_recs: 14971386

     

    2. lock dump 결과

     

    *** Lock Table Dump ***
     Lock Escalation at = 100000, Run Deadlock interval =  1.00

    Transaction (index  0, , @|0)
    Isolation COMMITTED READ
    State TRAN_ACTIVE
    Timeout_period : Infinite wait

    Transaction (index  1, query_editor_cub_cas_1, DBA@localhost|16378)
    Isolation COMMITTED READ
    State TRAN_ACTIVE
    Timeout_period : Infinite wait

    Transaction (index  2, query_editor_cub_cas_2, DBA@localhost|16379)
    Isolation COMMITTED READ
    State TRAN_ACTIVE
    Timeout_period : Infinite wait

    Transaction (index  3, lockdb, DBA@localhost|13637)
    Isolation COMMITTED READ
    State TRAN_ACTIVE
    Timeout_period : No wait

    Object Lock Table:
        Current number of objects which are locked    = 22
        Maximum number of objects which can be locked = 10000

    OID =  0|   193|  16
    Object type: Class = _db_index.
    Total mode of holders =     IX_LOCK, Total mode of waiters =   NULL_LOCK.
    Num holders=  1, Num blocked-holders=  0, Num waiters=  0
    LOCK HOLDERS:
        Tran_index =   1, Granted_mode =    IX_LOCK, Count =   1, Nsubgranules =  3

    OID =  0|   193|   8
    Object type: Class = _db_class.
    Total mode of holders =     IS_LOCK, Total mode of waiters =   NULL_LOCK.
    Num holders=  1, Num blocked-holders=  0, Num waiters=  0
    LOCK HOLDERS:
        Tran_index =   1, Granted_mode =    IS_LOCK, Count =   6, Nsubgranules =  0

    OID =  0|   193|-32752
    Object type: Class = _db_index.
    Total mode of holders =     IS_LOCK, Total mode of waiters =   NULL_LOCK.
    Num holders=  1, Num blocked-holders=  0, Num waiters=  0
    LOCK HOLDERS:
        Tran_index =   1, Granted_mode =    IS_LOCK, Count =   1, Nsubgranules =  0

    OID =  0|   193|-32758
    Object type: Class = _db_domain.
    Total mode of holders =     IS_LOCK, Total mode of waiters =   NULL_LOCK.
    Num holders=  1, Num blocked-holders=  0, Num waiters=  0
    LOCK HOLDERS:
        Tran_index =   1, Granted_mode =    IS_LOCK, Count =   1, Nsubgranules =  0

    OID =  0|   193|-32759
    Object type: Class = _db_attribute.
    Total mode of holders =     IS_LOCK, Total mode of waiters =   NULL_LOCK.
    Num holders=  1, Num blocked-holders=  0, Num waiters=  0
    LOCK HOLDERS:
        Tran_index =   1, Granted_mode =    IS_LOCK, Count =   1, Nsubgranules =  0

    OID =  0|   193|-32760
    Object type: Class = _db_class.
    Total mode of holders =     IS_LOCK, Total mode of waiters =   NULL_LOCK.
    Num holders=  1, Num blocked-holders=  0, Num waiters=  0
    LOCK HOLDERS:
        Tran_index =   1, Granted_mode =    IS_LOCK, Count =   1, Nsubgranules =  0

    OID =  0|   204|-32750
    Object type: Class = job.
    Total mode of holders =     IX_LOCK, Total mode of waiters =   NULL_LOCK.
    Num holders=  1, Num blocked-holders=  0, Num waiters=  0
    LOCK HOLDERS:
        Tran_index =   1, Granted_mode =    IX_LOCK, Count =   2, Nsubgranules =  0

    OID =  0|   194|-32767
    Object type: Class = _db_index_key.
    Total mode of holders =     IS_LOCK, Total mode of waiters =   NULL_LOCK.
    Num holders=  1, Num blocked-holders=  0, Num waiters=  0
    LOCK HOLDERS:
        Tran_index =   1, Granted_mode =    IS_LOCK, Count =   1, Nsubgranules =  0

    OID =  0|   208|-32763
    Object type: Class = charge_trans.
    Total mode of holders =     IX_LOCK, Total mode of waiters =   NULL_LOCK.
    Num holders=  1, Num blocked-holders=  0, Num waiters=  0
    LOCK HOLDERS:
        Tran_index =   1, Granted_mode =    IX_LOCK, Count =   2, Nsubgranules =  0

    OID =  0|   204|  18
    Object type: Class = job.
    Total mode of holders =  SCH_M_LOCK, Total mode of waiters =   NULL_LOCK.
    Num holders=  1, Num blocked-holders=  0, Num waiters=  0
    LOCK HOLDERS:
        Tran_index =   1, Granted_mode = SCH_M_LOCK, Count =   5, Nsubgranules =  0

    OID =  0|  2241| 166
    Object type: Instance of class ( 0|   193|  16) = _db_index.
    MVCC info: insert ID = 1413, delete ID = 1413.
    Total mode of holders =      X_LOCK, Total mode of waiters =   NULL_LOCK.
    Num holders=  1, Num blocked-holders=  0, Num waiters=  0
    LOCK HOLDERS:
        Tran_index =   1, Granted_mode =     X_LOCK, Count =   1

    OID =  0|  2241| 167
    Object type: Instance of class ( 0|   193|  16) = _db_index.
    MVCC info: insert ID = missing, delete ID = 1413.
    Total mode of holders =      X_LOCK, Total mode of waiters =   NULL_LOCK.
    Num holders=  1, Num blocked-holders=  0, Num waiters=  0
    LOCK HOLDERS:
        Tran_index =   1, Granted_mode =     X_LOCK, Count =   1

    OID =  0|   208|   5
    Object type: Class = charge_trans.
    Total mode of holders =  SCH_M_LOCK, Total mode of waiters =   NULL_LOCK.
    Num holders=  1, Num blocked-holders=  0, Num waiters=  0
    LOCK HOLDERS:
        Tran_index =   1, Granted_mode = SCH_M_LOCK, Count =  17, Nsubgranules =  0

    OID =  0|  2241| 169
    Object type: Instance of class ( 0|   193|  16) = _db_index.
    MVCC info: insert ID = missing, delete ID = 1413.
    Total mode of holders =      X_LOCK, Total mode of waiters =   NULL_LOCK.
    Num holders=  1, Num blocked-holders=  0, Num waiters=  0
    LOCK HOLDERS:
        Tran_index =   1, Granted_mode =     X_LOCK, Count =   1

    OID =  0|   193|   1
    Object type: Root class.
    Total mode of holders =     IX_LOCK, Total mode of waiters =   NULL_LOCK.
    Num holders=  1, Num blocked-holders=  0, Num waiters=  0
    LOCK HOLDERS:
        Tran_index =   1, Granted_mode =    IX_LOCK, Count =   2, Nsubgranules =  0

    OID =  0|   194|   1
    Object type: Class = _db_index_key.
    Total mode of holders =     IX_LOCK, Total mode of waiters =   NULL_LOCK.
    Num holders=  1, Num blocked-holders=  0, Num waiters=  0
    LOCK HOLDERS:
        Tran_index =   1, Granted_mode =    IX_LOCK, Count =   1, Nsubgranules =  5

    OID =  0|   208|   7
    Object type: Class = charge_item.
    Total mode of holders =      X_LOCK, Total mode of waiters =   NULL_LOCK.
    Num holders=  1, Num blocked-holders=  0, Num waiters=  0
    LOCK HOLDERS:
        Tran_index =   1, Granted_mode =     X_LOCK, Count = 11822046, Nsubgranules =  0

    OID =  0|  2369| 240
    Object type: Instance of class ( 0|   194|   1) = _db_index_key.
    MVCC info: insert ID = missing, delete ID = 1413.
    Total mode of holders =      X_LOCK, Total mode of waiters =   NULL_LOCK.
    Num holders=  1, Num blocked-holders=  0, Num waiters=  0
    LOCK HOLDERS:
        Tran_index =   1, Granted_mode =     X_LOCK, Count =   1

    OID =  0|  2369| 241
    Object type: Instance of class ( 0|   194|   1) = _db_index_key.
    MVCC info: insert ID = 1413, delete ID = 1413.
    Total mode of holders =      X_LOCK, Total mode of waiters =   NULL_LOCK.
    Num holders=  1, Num blocked-holders=  0, Num waiters=  0
    LOCK HOLDERS:
        Tran_index =   1, Granted_mode =     X_LOCK, Count =   1

    OID =  0|  2369| 242
    Object type: Instance of class ( 0|   194|   1) = _db_index_key.
    MVCC info: insert ID = missing, delete ID = 1413.
    Total mode of holders =      X_LOCK, Total mode of waiters =   NULL_LOCK.
    Num holders=  1, Num blocked-holders=  0, Num waiters=  0
    LOCK HOLDERS:
        Tran_index =   1, Granted_mode =     X_LOCK, Count =   1

    OID =  0|  2369| 245
    Object type: Instance of class ( 0|   194|   1) = _db_index_key.
    MVCC info: insert ID = missing, delete ID = 1413.
    Total mode of holders =      X_LOCK, Total mode of waiters =   NULL_LOCK.
    Num holders=  1, Num blocked-holders=  0, Num waiters=  0
    LOCK HOLDERS:
        Tran_index =   1, Granted_mode =     X_LOCK, Count =   1

    OID =  0|  2369| 246
    Object type: Instance of class ( 0|   194|   1) = _db_index_key.
    MVCC info: insert ID = missing, delete ID = 1413.
    Total mode of holders =      X_LOCK, Total mode of waiters =   NULL_LOCK.
    Num holders=  1, Num blocked-holders=  0, Num waiters=  0
    LOCK HOLDERS:
        Tran_index =   1, Granted_mode =     X_LOCK, Count =   1

  • ?
    오명환 2022.08.30 15:11
    10.2 버전의 truncate table은 delete all record로 되어 있습니다.
    전체 테이블을 빠르게 삭제하시려면 drop table 후 다시 create table를 하세요.
    그리고 create table시 reuse_oid option을 사용하세요.
  • ?
    steve 2022.08.30 18:20
    그럼 truncate가 delete all records로 되어 있지 않아서 처리가 빠른 버전 정보를 알려 주실 수 있나요?
  • ?
    오명환 2022.08.31 08:01
    11.2 버전을 사용하시면 됩니다.
    11.2 버전은 하위 버전의 DB 이미지가 호환되지 않습니다. unloaddb/loaddb를 통해 DB를 upgrade 하셔야 합니다.

  1. CUBRID 사용자를 위한 DBeaver 도구 출시 안내

    Date2024.04.23 Byadmin Views51
    read more
  2. SQLGate for CUBRID 영구 무료 라이선스 제공

    Date2020.04.09 Byadmin Views4458
    read more
  3. UPDATE/INSERT를 한번에 하는 쿼리 질문드립니다.

    Date2009.02.17 Bykkckc Views28829
    Read More
  4. UPDATE 문 WHERE절에 IN

    Date2018.08.02 By큐피 Views663
    Read More
  5. UPDATE 다중 테이블 질문드립니다.

    Date2014.11.06 By유릉 Views7234
    Read More
  6. Trigger 이벤트 시점에 대해 질문드립니다.

    Date2019.10.29 Bycubridtest Views281
    Read More
  7. Transaction 확인시 sql_id, sql text가 나오질 않습니다.

    Date2015.12.29 By큐불리드 Views5579
    Read More
  8. TimeZone 관련 질문

    Date2022.06.03 Bysteve Views145
    Read More
  9. TimeStamp 관련 Select 오류 질문입니다

    Date2012.12.07 ByPsionic Views9372
    Read More
  10. Tibero -> Cubrid 마이그레이션 질문입니다.

    Date2017.03.30 By님장사드리브큐 Views8248
    Read More
  11. This object is in a zombie state 인 경우

    Date2011.06.01 By유겸아빠 Views12070
    Read More
  12. This object is in a zombie state 오류발생 도와주세요 ㅠㅠ

    Date2010.09.02 By유니콘 Views9004
    Read More
  13. This may take a long time depending on the amount of recovery works to do.?

    Date2013.02.07 Byddan0701 Views9351
    Read More
  14. The size of data received from server is different from the expected

    Date2011.01.21 By사자 Views11069
    Read More
  15. The column name is invalid. 에러메시지 좀...

    Date2009.07.02 By논픽션Lover Views20964
    Read More
  16. Table 및 column에 대한 description은 제공을 안하나요?

    Date2012.12.03 By용쌤 Views7854
    Read More
  17. Table 및 Index 가 사용하고 크기를 알수 있는 방법을 알려 주세요

    Date2016.03.19 By브이찾기 Views9624
    Read More
  18. Table 및 Column Comment 작성

    Date2013.02.27 By김상윤 Views11900
    Read More
  19. Table primary key잡는 중 중단 시키고, 서버 재시작하니 에러나고 시작이 안되네요.

    Date2011.06.28 By미스터투 Views7762
    Read More
  20. Table doesn't exist 에러..

    Date2016.12.05 By가라가라 Views10
    Read More
  21. Table Drop, truncate 시 시간이 너무 오래 걸립니다.

    Date2022.08.29 Bysteve Views753
    Read More
  22. Table Drop 후 데이터 볼륨 Size 에 변동이 없네요.

    Date2016.03.24 By브이찾기 Views9333
    Read More
Board Pagination Prev 1 ... 143 144 145 146 147 148 149 150 151 152 ... 200 Next
/ 200

Contact Cubrid

대표전화 070-4077-2110 / 기술문의 070-4077-2113 / 영업문의 070-4077-2112 / Email. contact_at_cubrid.com
Contact Sales