Re: tracking scripts...

From: Joey Quinn <bjquinniii(at)gmail(dot)com>
To: Vick Khera <vivek(at)khera(dot)org>
Cc: PostgreSQL General <pgsql-general(at)postgresql(dot)org>
Subject: Re: tracking scripts...
Date: 2013-11-26 17:29:52
Message-ID: CAG5XHYnbWVkgU6emzEZWd2P_jaxY6PeSfuBCGOQBLJ3WvUOKZg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

The ipv4 column is of type inet. It is the primary key (btree access) and
access times for queries on individual ip addresses have been around 10-15
ms.

On Tue, Nov 26, 2013 at 12:13 PM, Vick Khera <vivek(at)khera(dot)org> wrote:

>
> On Tue, Nov 26, 2013 at 12:11 PM, Joey Quinn <bjquinniii(at)gmail(dot)com> wrote:
>
>> update ipv4_table set country='xx' where ipv4 between 'xxx.xxx.xxx.xxx'
>> and 'xxx.xxx.xxx.xxx';
>>
>> There are 127k lines like that (each with a different range and the
>> appropriate country code). Each is terminated with a semi-colon. Does that
>> make them individual transactions in postgres or not? (postgres newbie
>> here). Is there something else I need to do for them to be treated like
>> separate transactions?
>>
>
> If you did not wrap the whole thing with begin/commit then each is its own
> transaction. I certainly hope you have an appopriate index on that ipv4
> column and it is appropriately typed.
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message maillists0 2013-11-26 17:41:58 AccessShareLock and Resource Contention
Previous Message Joey Quinn 2013-11-26 17:24:26 Re: tracking scripts...