Следуюя рекомендациям "Инструкции по архивированию таблиц списаний" реализовал архивацию таблицы payment_transactions.
После этого в Основных отчетах за архивный период не отображается информация в столбце Платежи.
При этом Отчеты по платежам за архивные периоды работают исправно.
Код: Выделить всё
+----+------------+------------+--------------------------------------------+------------+------------+
| id | archive_id | table_type | table_name | start_date | end_date |
+----+------------+------------+--------------------------------------------+------------+------------+
| 3 | 200905 | 1 | discount_transactions_all_200905 | 1241110800 | 1243789199 |
| 4 | 200906 | 1 | discount_transactions_all_200906 | 1243789200 | 1246381199 |
| 5 | 200906 | 2 | discount_transactions_iptraffic_all_200906 | 1243789200 | 1246381199 |
| 6 | 200905 | 7 | payment_transactions_200905 | 1241110800 | 1243789199 |
| 7 | 200907 | 1 | discount_transactions_all_200907 | 1246381200 | 1249059599 |
| 8 | 200906 | 7 | payment_transactions_200906 | 1243789200 | 1246381199 |
| 9 | 200907 | 2 | discount_transactions_iptraffic_all_200907 | 1246381200 | 1249059599 |
| 10 | 200907 | 7 | payment_transactions_200907 | 1246381200 | 1249059599 |
| 11 | 200908 | 1 | discount_transactions_all_200908 | 1249059600 | 1251737999 |
| 12 | 200908 | 2 | discount_transactions_iptraffic_all_200908 | 1249059600 | 1251737999 |
| 13 | 200908 | 7 | payment_transactions_200908 | 1249059600 | 1251737999 |
| 14 | 200909 | 1 | discount_transactions_all_200909 | 1251738000 | 1254329999 |
| 15 | 200909 | 2 | discount_transactions_iptraffic_all_200909 | 1251738000 | 1254329999 |
| 16 | 200909 | 7 | payment_transactions_200909 | 1251738000 | 1254329999 |
| 17 | 200910 | 1 | discount_transactions_all_200910 | 1254330000 | 1257011999 |
| 18 | 200910 | 2 | discount_transactions_iptraffic_all_200910 | 1254330000 | 1257011999 |
| 19 | 200910 | 7 | payment_transactions_200910 | 1254330000 | 1257011999 |
| 20 | 200911 | 1 | discount_transactions_all_200911 | 1257012000 | 1259603999 |
| 21 | 200911 | 2 | discount_transactions_iptraffic_all_200911 | 1257012000 | 1259603999 |
| 22 | 200911 | 7 | payment_transactions_200911 | 1257012000 | 1259603999 |
| 23 | 200912 | 1 | discount_transactions_all_200912 | 1259604000 | 1262282399 |
| 24 | 200912 | 2 | discount_transactions_iptraffic_all_200912 | 1259604000 | 1262282399 |
| 25 | 200912 | 7 | payment_transactions_200912 | 1259604000 | 1262282399 |
| 26 | 201001 | 1 | discount_transactions_all_201001 | 1262282400 | 1264960799 |
| 27 | 201001 | 2 | discount_transactions_iptraffic_all_201001 | 1262282400 | 1264960799 |
| 28 | 201001 | 7 | payment_transactions_201001 | 1262282400 | 1264960799 |
+----+------------+------------+--------------------------------------------+------------+------------+
Это баг или я что-то не так делаю??Debug : Feb 10 18:25:40 DBCtx: <170357976> SQL SELECT query: SELECT archive_id,start_date,end_date FROM archives ORDER BY id
?Debug : Feb 10 18:25:40 UTM5 DBA: archive ID <201001> case: start <= per_start && end >= per_end
?Debug : Feb 10 18:25:40 UTM5 DBA: start(1262282400) < r(1264960799) < end(1264960800), adding non-archive table into report
?Debug : Feb 10 18:25:40 DBCtx: <170357976> SQL SELECT query: SELECT table_name FROM archives WHERE archive_id='201001' AND table_type='1'
?Debug : Feb 10 18:25:40 DBCtx: <170357976> SQL SELECT query: SELECT SUM(discount),SUM(discount_with_tax),service_type,account_id FROM discount_transactions_all_201001 WHERE discount_date >= 1262282400 AND discount_date < 1264960799 GROUP BY service_type, account_id ORDER BY account_id
?Debug : Feb 10 18:25:40 DBCtx: <170357976> SQL SELECT query: SELECT MIN(id),account_id FROM discount_transactions_all_201001 WHERE discount_date >= '1262282400' AND discount_date < '1264960799' GROUP BY account_id
?Debug : Feb 10 18:25:40 DBCtx: <170357976> SQL SELECT query: SELECT incoming_rest FROM discount_transactions_all_201001 WHERE id='14254619'
?Debug : Feb 10 18:25:40 DBCtx: <170357976> SQL SELECT query: SELECT incoming_rest FROM discount_transactions_all_201001 WHERE id='14840175'
?Debug : Feb 10 18:25:40 DBCtx: <170357976> SQL SELECT query: SELECT incoming_rest FROM discount_transactions_all_201001 WHERE id='14255456'
?Debug : Feb 10 18:25:40 DBCtx: <170357976> SQL SELECT query: SELECT incoming_rest FROM discount_transactions_all_201001 WHERE id='14254510'
?Debug : Feb 10 18:25:40 DBCtx: <170357976> SQL SELECT query: SELECT incoming_rest FROM discount_transactions_all_201001 WHERE id='14254611'
?Debug : Feb 10 18:25:40 DBCtx: <170357976> SQL SELECT query: SELECT incoming_rest FROM discount_transactions_all_201001 WHERE id='14254991'
?Debug : Feb 10 18:25:40 DBCtx: <170357976> SQL SELECT query: SELECT incoming_rest FROM discount_transactions_all_201001 WHERE id='14255007'
?Debug : Feb 10 18:25:40 DBCtx: <170357976> SQL SELECT query: SELECT incoming_rest FROM discount_transactions_all_201001 WHERE id='14254961'
?Debug : Feb 10 18:25:40 DBCtx: <170357976> SQL SELECT query: SELECT incoming_rest FROM discount_transactions_all_201001 WHERE id='14254963'
?Debug : Feb 10 18:25:40 DBCtx: <170357976> SQL SELECT query: SELECT incoming_rest FROM discount_transactions_all_201001 WHERE id='14365432'
...
?Debug : Feb 10 18:25:40 DBCtx: <170357976> SQL SELECT query: SELECT outgoing_rest FROM discount_transactions_all_201001 WHERE id='17699690'
?Debug : Feb 10 18:25:40 DBCtx: <170357976> SQL SELECT query: SELECT outgoing_rest FROM discount_transactions_all_201001 WHERE id='17691093'
?Debug : Feb 10 18:25:40 DBCtx: <170357976> SQL SELECT query: SELECT outgoing_rest FROM discount_transactions_all_201001 WHERE id='17676898'
?Debug : Feb 10 18:25:40 DBCtx: <170357976> SQL SELECT query: SELECT SUM(discount),SUM(discount_with_tax),service_type,account_id FROM discount_transactions_all WHERE discount_date >= 1264960799 AND discount_date < 1264960800 GROUP BY service_type, account_id ORDER BY account_id
?Debug : Feb 10 18:25:40 DBCtx: <170357976> SQL SELECT query: SELECT MIN(id),account_id FROM discount_transactions_all WHERE discount_date >= '1264960799' AND discount_date < '1264960800' GROUP BY account_id
?Debug : Feb 10 18:25:40 DBCtx: <170357976> SQL SELECT query: SELECT MAX(id),account_id FROM discount_transactions_all WHERE discount_date >= '1264960799' AND discount_date < '1264960800' GROUP BY account_id
?Debug : Feb 10 18:25:40 DBCtx: <170357976> SQL SELECT query: SELECT SUM(payment_absolute),account_id FROM payment_transactions WHERE payment_enter_date >= '1262282400' AND payment_enter_date < '1264960800' AND method <> '7' GROUP BY account_id