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. cubrid_ha.conf 셋팅중 질문입니다.

    Date2022.10.18 By하얀미스 Views68
    Read More
  4. 큐브리드가 실행이 안됩니다.

    Date2022.10.18 By장천 Views106
    Read More
  5. FORAMT값 적용안됨

    Date2022.10.14 By귀기기기 Views61
    Read More
  6. CentOS 큐브리드 속도 저하 이슈

    Date2022.10.13 By리에레이 Views105
    Read More
  7. start connect 문을 이용 하여 업데이트 문의

    Date2022.10.13 Bygidoree Views84
    Read More
  8. CUBRIDDataReader row count와 DataTable row카운트가 다른이유

    Date2022.10.13 By어낚 Views114
    Read More
  9. DB 툴을 이용하여 큐브리드 연결이 안됩니다.

    Date2022.10.11 By방구석꿈틀이 Views162
    Read More
  10. SQLGate에서 서버오류 발생합니다

    Date2022.10.09 By두듀두듀듀 Views105
    Read More
  11. 백업파일명에 접미어(_년월일) 삽입 할 수 있는 방법을 알고 싶습니다

    Date2022.10.05 Bygidoree Views130
    Read More
  12. ERWIN Reverse Engineering 관련 문의드립니다.

    Date2022.10.05 By초코초코초 Views332
    Read More
  13. 메타 데이터 수집 관련하여 사용자 계정 추가생성

    Date2022.09.30 By장천 Views105
    Read More
  14. 다른 스키마의 테이블을 조회할수 없나요?

    Date2022.09.28 By엘L Views499
    Read More
  15. 자바 저장 프로시저 서버 기동 문의

    Date2022.09.27 By준88 Views72
    Read More
  16. jni 사용시 windows server 2012에서 다중세션에서 하나의 세션을 제외하고 나머지 세션에서 "java.lang.UnsatisfiedLinkError" 오류 발생

    Date2022.09.26 By두목원슝 Views123
    Read More
  17. table schema 관련 정보 얻기

    Date2022.09.23 Bysmilena Views70
    Read More
  18. ODBC Error 관련

    Date2022.09.22 By땜쟁이 Views240
    Read More
  19. 안녕하세요. cubrid 셋팅값 질문입니다.

    Date2022.09.21 By우유악마 Views93
    Read More
  20. Cubrid 11.2 연결시 677 오류.

    Date2022.09.21 By엘L Views124
    Read More
  21. Cubrid 11.2 JDBC는 어디서 받을 수 있나요?

    Date2022.09.21 By엘L Views208
    Read More
  22. Cubrid 11.2 logback DBAppender 지원문의

    Date2022.09.19 Bytomato Views137
    Read More
Board Pagination Prev 1 ... 10 11 12 13 14 15 16 17 18 19 ... 200 Next
/ 200

Contact Cubrid

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