From: | Jim Green <student(dot)northwestern(at)gmail(dot)com> |
---|---|
To: | Andy Colson <andy(at)squeakycode(dot)net> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: huge price database question.. |
Date: | 2012-03-21 02:49:08 |
Message-ID: | CACAe89w1FqESjJraoXGPBCuFP5WTgwoYb9hqLGGq44HkgtV=HQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 20 March 2012 22:43, Andy Colson <andy(at)squeakycode(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | John R Pierce | 2012-03-21 02:57:21 | Re: huge price database question.. |
Previous Message | Andy Colson | 2012-03-21 02:43:36 | Re: huge price database question.. |