Re: optimization (another tack)

From: Date: Mon, 04 Mar 2002 16:32:37 +0000
Subject: Re: optimization (another tack)
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-17451@lists.php.net to get a copy of this message
Messagethanks! "Ray Hunter" <rhunter@enterasys.com> wrote in message news:59358A738F45D51186A30008C74CE250E81471@slc-exc1.ctron.com... Here is general information on postgres: http://www.ca.postgresql.org/docs/aw_pgsql_book/index.html Here is an optimization file included: This was not written by me!!! Let me know if you have questions...s Ray Hunter Firmware Engineer ENTERASYS NETWORKS -----Original Message----- From: Aron Pilhofer [mailto:aronpilhofer@yahoo.com] Sent: Monday, March 04, 2002 9:10 AM To: Hunter, Ray Subject: RE: [PHP-DB] optimization (another tack) That would be great! Thanks. [Aron Pilhofer] -----Original Message----- From: Hunter, Ray [mailto:rhunter@enterasys.com] Sent: Monday, March 04, 2002 11:04 AM To: 'Aron Pilhofer'; php-db@lists.php.net Subject: RE: [PHP-DB] optimization (another tack) If you are using php and a database you can add more memory to the script and optimize the database. I only use postgres databases for all my large data so I can let you know how to optimize postgres... Ray Hunter Firmware Engineer ENTERASYS NETWORKS -----Original Message----- From: Aron Pilhofer [mailto:aronpilhofer@yahoo.com] Sent: Monday, March 04, 2002 9:02 AM To: php-db@lists.php.net Subject: [PHP-DB] optimization (another tack) Let me try this again more generally. I am trying to optimize a function in PHP that handles very large result sets, which are transferred to arrays, and that does some extremely heavy lifting in terms of calculations on those arrays. By design, it iterates through each possible combination of two result sets, and does some calculations on those results. As you can imagine, the numbers get quite large, quite fast; sets of 500 by 1000 necessitate a half-million calculations. So, short of rewriting this function in C, which I cannot do, are there any suggestions for optimizing. For example: 1) is there any advantage to caching an array as a local file? 2) the script pumps the results of the calculations into a new table.. would it be faster to dump it into a local file instead? 3) is there any advantage to executing the script as a CGI? (does that make sense? I don't know if I know the correct jargon here...) Any other tips folks have for scripts that handle a lot of calculations would be greatly appreciated. Thanks in advance. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.db (#17451) next »