2016-01-15 10:44 GMT+13:00 [email protected] <[email protected]>:
> 1 - Seleciono todos os file IDs do gorfs inodes/segments etc... >> Para cada arquivo ponho ele na nova tabela gorfs.nfs_data >> >> 2 - Talvez adicionar uma coluna tipo bath number >> 3 - Selecionar 5000 rows da tabela nfs_data e dar a elas todos os mesmos >> batch number >> 4 - Criar um SQL para selecionar quantos batch há.. para sabermos quantas >> vezes o script irá rodar. >> >> Porém.. estou tendo dificuldades em prosseguir... Se alguém pudesse >> ajudar... >> > > >> Obrigado! >> >> *Criei uma Query tipo esta:* INSERT INTO gorfs.nfs_data (owner_id, file_id, migration_path, > migration_date) > VALUES (SELECT > file.parent_inode_id AS owner_id, > file.inode_id AS file_id, > file.node_full_path AS file_name, > file.last_modified AS date_created > FROM > gorfs.nodes AS file > WHERE (file.last_modified < (transaction_timestamp() AT TIME > ZONE 'UTC' - '1 months' :: INTERVAL))) Estou no caminho certo? hehehe
_______________________________________________ pgbr-geral mailing list [email protected] https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral
