| From: | Merlin Moncure <mmoncure(at)gmail(dot)com> |
|---|---|
| To: | Aren Cambre <aren(at)arencambre(dot)com> |
| Cc: | Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>, pgsql-performance(at)postgresql(dot)org |
| Subject: | Re: Postgres refusing to use >1 core |
| Date: | 2011-05-10 14:06:38 |
| Message-ID: | BANLkTinAys0Z3fDj4UQitTbuH+CKPCs=WA@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-performance |
On Mon, May 9, 2011 at 9:40 PM, Aren Cambre <aren(at)arencambre(dot)com> wrote:
>> how are you reading through the table? if you are using OFFSET, you
>> owe me a steak dinner.
>>
>
> Nope. :-)
> Below is my exact code for the main thread. The C# PLINQ statement is
> highlighted. Let me know if I can help to explain this.
>
> 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
>
> ///
> http://social.msdn.microsoft.com/Forums/en-US/parallelextensions/thread/2f5ce226-c500-4899-a923-99285ace42ae.
>
> foreach(IDataRecord arrest in
>
> from row in arrests.AsParallel().Cast <IDataRecord>()
>
> select row)
>
> {
>
> Geocoder geocodeThis = new Geocoder(arrest);
>
> geocodeThis.Geocode();
>
> }
>
>
>
> arrestsConnection.Close();
hm. I'm not exactly sure. how about turning on statement level
logging on the server for a bit and seeing if any unexpected queries
are being generated and sent to the server.
merlin
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Jeff | 2011-05-10 14:24:17 | Re: Benchmarking a large server |
| Previous Message | tv | 2011-05-10 09:44:46 | Re: 8.2.13 commit is taking too much time |