sorry for my English, I write through Google translator.
I use cratedb and PHP. I have a table (cakes
) in crate, that currently has 1 million records.
For part of the records, I want to do an update on a condition on column lastmode
. Do select to an existing page on my site and update to multiple threads. In this crate with the server fall down (502 error).
My connection:
require_once '/var/www/remaru/data/vendor/autoload.php';
$opt = array (
'driverClass' => 'Crate\DBAL\Driver\PDOCrate\Driver',
'host' => 'localhost',
'port' => 4200
);
$params['connection'] = \Doctrine\DBAL\DriverManager::getConnection( $opt );
return $params;
Update:
$query =
"update cakes set str='". $params['cache']['data']
."', tpl='". $params['cache']['tpl']
."', lastmod='". $cur_time
."' where url='". $url ."'";
$params['addons/system/db'] -> query( $params['connection'] , $query );
At the same time I have no difficulties with the update in 1 stream. How to make a mass update in several threads at the same time? In 1 stream, the next 10 million records will be processed forever...