简体   繁体   中英

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. Suppose I have about 100 000 no. of product list in xml file and at the same time,i am having same 100 000 records in database. Reading from which place(xml or database) will consume less time or increase my website performance.

Database is better.

It can handle higher load, concurrency and caching better than parsing XML file each time.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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