Re: huge price database question.. - Mailing list pgsql-general

From Jim Green
Subject Re: huge price database question..
Date
Msg-id CACAe89w1FqESjJraoXGPBCuFP5WTgwoYb9hqLGGq44HkgtV=HQ@mail.gmail.com
Whole thread Raw
In response to Re: huge price database question..  (Andy Colson <andy@squeakycode.net>)
Responses Re: huge price database question..  (John R Pierce <pierce@hogranch.com>)
Re: huge price database question..  (Andy Colson <andy@squeakycode.net>)
List pgsql-general
On 20 March 2012 22:43, Andy Colson <andy@squeakycode.net> wrote:
> Here is some copy/pasted parts:
>
> my @list = glob('*.gz');
> for my $fname (@list)
> {
>        $db->do('copy access from stdin');
>        open my $fh, "-|", "/usr/bin/zcat $fname" or die "$fname: $!";
>        while (<$fh>)
>        {
>                # bunch of stuff to format sniped here
>                # if you have comma separated or something you might be able
>                # to just feed it in
>
>  $db->pg_putcopydata("$county\t$ip\t$time\t$status\t$size\t$url\t$ua\n");
>        }
>        $db->pg_endcopy;
>        $db->commit;
> }
>
>
> Do you ever plan on batch deleted a BUNCH of records?

no, after historical data is populated, I'll only add data daily. no delete..

>
> Do you ever want to do read all of one symbol (like, select avg(high) from
> stocks where symbol = 'bob')?

yes its possible but I would more likely grab the data to R and get
the avg in R..

Thanks,
Jim.

>
> -Andy

pgsql-general by date:

Previous
From: Andy Colson
Date:
Subject: Re: huge price database question..
Next
From: John R Pierce
Date:
Subject: Re: huge price database question..