简体   繁体   English

在php中从XML和数据库中读取数据的更好方法

[英]better way to read data out of XML and database in php

I am having confusion in differences in reading data from xml or from database in php. 我在从xml或从php中的数据库读取数据的差异中感到困惑。 Suppose I have about 100 000 no. 假设我有大约10万个。 of product list in xml file and at the same time,i am having same 100 000 records in database. 同时在xml文件中列出产品列表,我在数据库中有相同的100000条记录。 Reading from which place(xml or database) will consume less time or increase my website performance. 从哪个位置(xml或数据库)读取将减少时间或提高我的网站性能。

Database is better. 数据库更好。

It can handle higher load, concurrency and caching better than parsing XML file each time. 与每次解析XML文件相比,它可以更好地处理更高的负载,并发性和缓存。

Also, database scale better - imagine you have 10 000 records - the xml file can become 20-30 mb, while 10 000 for a database is nothing 另外,数据库规模更好-假设您有10,000条记录-xml文件可以变成20-30 mb,而数据库的10,000条什么也没有

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM