최대 절전 모드에서 <property name="show_sql">true</property>
으로 선언되었습니다. 이 link에서 stdout 문제를 읽었습니다. Stdout은 더 많은 메모리를 소비합니다. 그래서 show_sql 기능은 어떻게 작동할까요?. 왜냐하면 나는 서버 로그 stdout SQL 쿼리를 보았다.Hibernate show sql이 Stdout과 같습니다.
13:06:53,323 INFO [stdout] (http-/172.29.250.43:8080-7) Hibernate: select sampledata0_.idsample as idsample4_10_1_, sampledata0_.id as id1_9_1_, sampledata0_.id as id1_9_0_, sampledata0_.idsample as idsample4_9_0_, sampledata0_.sname as sname2_9_0_, sampledata0_.svalue as svalue3_9_0_ from sample_meta_data sampledata0_ where sampledata0_.idsample=?
13:06:53,324 INFO [stdout] (http-/172.29.250.43:8080-7) Hibernate: select sampledata0_.idsample as idsample4_10_1_, sampledata0_.id as id1_9_1_, sampledata0_.id as id1_9_0_, sampledata0_.idsample as idsample4_9_0_, sampledata0_.sname as sname2_9_0_, sampledata0_.svalue as svalue3_9_0_ from sample_meta_data sampledata0_ where sampledata0_.idsample=?
System.out.println
을 내부적으로 최대 절전 모드로 가정합니다. 그럼 더 많은 기억을 소비할까요? format_sql
및 show_sql
은 내부적으로 어떻게 작동합니까?
으로 설정해야합니다. "SQL.을 콘솔에 기록합니다." 그러나 쓰기에는 몇 밀리 초가 걸립니다. – ashokhein
@ashokhein, 내 답변을 명확하게하기 위해 세부 사항을 업데이트했습니다. 확인하십시오. – Chaitanya