Re: Postgres refusing to use >1 core
От | Aren Cambre |
---|---|
Тема | Re: Postgres refusing to use >1 core |
Дата | |
Msg-id | BANLkTi=BvGMvsBNq8DUt=_MPJXZjcC0TWg@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Postgres refusing to use >1 core (Merlin Moncure <mmoncure@gmail.com>) |
Ответы |
Re: Postgres refusing to use >1 core
Re: Postgres refusing to use >1 core |
Список | pgsql-performance |
how are you reading through the table? if you are using OFFSET, you
owe me a steak dinner.
NpgsqlConnection arrestsConnection = new NpgsqlConnection(Properties.Settings.Default.dbConnectionString);
arrestsConnection.Open();
/// First clear out the geocoding table
NpgsqlCommand geocodingTableClear = new NpgsqlCommand("TRUNCATE raw.\"TxDPS geocoding\"", arrestsConnection);
geocodingTableClear.ExecuteNonQuery();
NpgsqlDataReader arrests = new NpgsqlCommand("SELECT * FROM \"raw\".\"TxDPS all arrests\"", arrestsConnection).ExecuteReader();
/// Based on the pattern defined at
foreach(IDataRecord arrest in
from row in arrests.AsParallel().Cast <IDataRecord>()
select row)
{
Geocoder geocodeThis = new Geocoder(arrest);
geocodeThis.Geocode();
}
arrestsConnection.Close();
В списке pgsql-performance по дате отправления: