[PostgreSQL] 날짜 범위 검색


[PostgreSQL] 날짜 범위 검색

PostgreSQL Date & Time Function 해당 날짜의 데이터 select count(watt_max) from tbl_test_watt3_sm2ch_min where to_char(regdate, 'YYYY-MM-DD') = '2016-10-17' 소요시간 : 124초 (150만건) (하루: 20*60*60*24 = 1,728,000) 이렇게 하면 망함! 해당 날짜의 데이터 select count(watt) from tbl_test_watt_lsh where regdate >= date '2016-10-17' and regdate = current_date and regdate '2016-10-17 07:40:00' AND to_char(regdate , 'YYYY-MM-DD HH24;M..


원문링크 : [PostgreSQL] 날짜 범위 검색