[nyphp-talk] Party Like It's 1234567890

2009-02-13 Thread Chris Shiflett
It's a little late, but if anyone is interested in dropping by our office to christen our new kegerator and celebrate Unix time 1234567890, let me know. Address and map here: http://omniti.com/is/here The New York office, of course. :-) Chris ___

Re: [nyphp-talk] slow php

2009-02-13 Thread Daniel Convissor
Hi Nicholas: Here are two additional options to consider, both revolving around the concept of getting the database to do the work. First, many people write scripts to read, modify and then write the data back to the database because they are unfamilliar with the INSERT SELECT and UPDATE SELEC

Re: [nyphp-talk] slow php (slow database)

2009-02-13 Thread Paul A Houle
The fastest way to get data into mysql is like this: http://dev.mysql.com/doc/refman/5.1/en/load-data.html I needed to load 2.5M RDF triples into mysql to look up some identifiers. My RDF store balked at the turtle file, so I hacked away the header and treated it like a space-separated file.

Re: [nyphp-talk] slow php (slow database)

2009-02-13 Thread Hans Zaunere
> > Also, it may be that mySQL supports multiple inserts per line, in which case > > you can do 10 inserts per round trip. This will speed it up w/o requiring > > you to do to a different command for the bulk copy. > > To the best of my knowledge, you can't send more than one statement at > a tim

Re: [nyphp-talk] slow php (slow database)

2009-02-13 Thread csnyder
On Fri, Feb 13, 2009 at 3:39 PM, Kenneth Downs wrote: > This ain't PHP,and Python won't help. Inserting 2.4 million rows into a > database will take hours if you go line by line. You are paying a big > overhead of a round trip to the server for each row. > > The best way to speed it up is to use

Re: [nyphp-talk] slow php

2009-02-13 Thread Rolan Yang
Nicholas Hart wrote: I have a php 'cron job' script which is inserting some records. It uses arrays to store 12 field records along with several nested loops in which it tests various currency values from a separate 4 field table and sorts them to get the lowest one for insert into a new 4 fi

Re: [nyphp-talk] slow php

2009-02-13 Thread Hans Zaunere
> I have a php 'cron job' script which is inserting some records. It > uses arrays to store 12 field records along with several nested loops > in which it tests various currency values from a separate 4 field table > and sorts them to get the lowest one for insert into a new 4 field > table record

Re: [nyphp-talk] slow php

2009-02-13 Thread Anthony Wlodarski
I would have to agree. The disk I/O is going to be large for a such a data set. I think in this instance it is better to ask a few hundred bigger questions of the database then a few million smaller questions. -Anthony -- Anthony Wlodarski www.thrillist.com Web App

Re: [nyphp-talk] slow php (slow database)

2009-02-13 Thread Kenneth Downs
This ain't PHP,and Python won't help. Inserting 2.4 million rows into a database will take hours if you go line by line. You are paying a big overhead of a round trip to the server for each row. The best way to speed it up is to use what they call "bulk copy" on MS SQL Server and "copy" on P

Re: [nyphp-talk] slow php

2009-02-13 Thread Jesse Callaway
On Fri, Feb 13, 2009 at 3:31 PM, Nicholas Hart wrote: > I have a php 'cron job' script which is inserting some records. It uses > arrays to store 12 field records along with several nested loops in which it > tests various currency values from a separate 4 field table and sorts them > to get the

[nyphp-talk] slow php

2009-02-13 Thread Nicholas Hart
I have a php 'cron job' script which is inserting some records. It uses arrays to store 12 field records along with several nested loops in which it tests various currency values from a separate 4 field table and sorts them to get the lowest one for insert into a new 4 field table record. It has

Re: [nyphp-talk] Corp. and Non-Profit PHP Users for Web

2009-02-13 Thread Mary Beth Kooper
The Jewish Museum: http://www.thejewishmuseum.org Saving Antiquities for Everyone (SAFE): http://www.savingantiquities.org Message: 1 Date: Mon, 2 Feb 2009 19:43:46 -0500 From: "Peter Sawczynec" Subject: [nyphp-talk] Corp. and Non-Profit PHP Users for Web To: "'Org, t...@nyphp.'" Me