insert into table

Поиск
Список
Период
Сортировка
От Yambu
Тема insert into table
Дата
Msg-id CALhHtcAEh82EYxvHVenoaCySidM7UM1Jnm0p1WQr7hgROtjpXA@mail.gmail.com
обсуждение исходный текст
Ответы Re: insert into table  (Scott Ribe <scott_ribe@elevated-dev.com>)
Re: insert into table  ("David G. Johnston" <david.g.johnston@gmail.com>)
Список pgsql-admin
hi

may i know why the below mysql is not inserting into table analyze_checks



insert into analyze_checks(dbname,table_name,frag_ratio, days,needs_optimization,needs_analyzing )
(select
'test' as dbname,
table_name,
frag_ratio,
days,
needs_optimization,
needs_analyzing
from
(select
table_name,
cast(frag_ratio as decimal(5,2)) as frag_ratio,
days,
case when frag_ratio > 1 then 'Yes' else 'No' end as needs_optimization,
case when days > -1 then 'Yes' else 'No' end as needs_analyzing
from (
select
t.ENGINE,
concat(t.TABLE_SCHEMA, '.', t.TABLE_NAME) as table_name,
round(t.DATA_FREE/1024/1024, 2) as data_free,
(t.data_free/(t.index_length+t.data_length)) as frag_ratio,
datediff(now(), last_update) as days
FROM information_schema.tables t
left join mysql.innodb_table_stats s on t.table_name=s.table_name
WHERE DATA_FREE > 0 ORDER BY frag_ratio DESC )d ) d
where needs_optimization='Yes' or needs_analyzing='Yes');

В списке pgsql-admin по дате отправления:

Предыдущее
От: Nikhil Shetty
Дата:
Сообщение: Re: Upgrading password encryption from md5 to scram-sh-256
Следующее
От: Scott Ribe
Дата:
Сообщение: Re: insert into table