This is more of an application architecture question than a mysql question.
Though I'll offer my two cents:
What are you going to do with the XML file? Write it to disk, so you can later
read it, and parse it just to get your result set back? That sounds a lot
slower than fetching it from mysql again. You can test it though -- write a
script, time a bunch of iterations and prove to yourself if it's a good idea or
not.
Generally the way to optimize reading xml faster is to not do it.
IMO if you want caching then use something that was meant for it like memcached.
Regards,
Gavin Towey
-Original Message-
From: paras...@gmail.com [mailto:paras...@gmail.com] On Behalf Of Daniel Brown
Sent: Friday, July 10, 2009 9:37 AM
To: workerho...@studysite.eu
Cc: PHP; MYSQL General List
Subject: Re: [PHP] mysql cache query as xml
Chris;
From my understanding of your question, your message (included
below in its entirety) is better sent to the MySQL General list, which
I've CC'd on this reply. If you haven't yet, please subscribe there
at mysql-subscr...@lists.mysql.com to follow the thread for responses.
If I'm misunderstanding and you're asking a PHP-related question,
please rephrase your question.
[Full original message follows.]
On Fri, Jul 10, 2009 at 12:22,
workerho...@studysite.euworkerho...@studysite.eu wrote:
hi guys, i need some help by optimize the performance.
my problem is that i need a lot of rows the whole site (don't ask i need the
rows really :-) )
this is about ~4000 rows it will be loaded from mysql database in 0.3
seconds
my idea was to cache this rows in a xml file like for example:
category
idsome hash id/id
titlecategory title /title
/category
..
also load query from mysql first, save to xml using 6 hours, erase the
cached file, load query against
but to load the same num rows from xml during more then 3 seconds in
comparison mysql need just 0.3 seconds.
how can i optimize the reading from xml faster?
server design:
2 mysql server (Master Slave with Replication )
8 Applikation Server with connect to the 2 mysql server
this i the reason why i want to cache this query anyway! other querys just
need about 0.0004 seconds, but this is the slowest query!
i hope someone can help me or had a better ideas to solve this problem!
thanks chris
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
/Daniel P. Brown
daniel.br...@parasane.net || danbr...@php.net
http://www.parasane.net/ || http://www.pilotpig.net/
Check out our great hosting and dedicated server deals at
http://twitter.com/pilotpig
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=gto...@ffn.com
The information contained in this transmission may contain privileged and
confidential information. It is intended only for the use of the person(s)
named above. If you are not the intended recipient, you are hereby notified
that any review, dissemination, distribution or duplication of this
communication is strictly prohibited. If you are not the intended recipient,
please contact the sender by reply email and destroy all copies of the original
message.
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org