Author Topic: how can i go about making my server perform queries fastest?  (Read 1123 times)

0 Members and 1 Guest are viewing this topic.

Offline alco19357Topic starter

  • Enthusiast
  • Posts: 55
    • View Profile
i'm creating an intricate site. the options for database are: mysql, sqllite, or xml

it will communicate with php. i need to know, 1) which will be the fastest and lightest on bandwidth/server load overall (when the site gets massive), 2) which is most similar to mysql queries (sqllite or xml), 3) can sqllite and xml perform: select, update, delete, insert similar to the queries by mysql (i know there's something for xml called "xml_query2xml" in pear, but does this allow you to do insert, delete, and update like you would in mysql?)

also, if you can provide any xml frameworks that do the following for databases, that'd help toO!!

thanks, alex

Offline Axeia

  • Devotee
  • Posts: 716
  • Gender: Male
    • View Profile
Re: how can i go about making my server perform queries fastest?
« Reply #1 on: June 12, 2009, 06:10:00 AM »
SQLite is very similar to MySQL as they're both SQL.
Although there are some noticable differences, like SQLite not enforcing datatypes and lacking support for some things.. especially if you use the php sqlite functions as that's SQLite 2 as opposed to the SQLite3 that's available via the PDO driver. Something lacking is for example foreign keys not being enforced, meaning you will have to write triggers if you want a cascading delete.

SQLite does perform faster than mysql for the most common queries (select). Not sure how you intend to tie in XML to this. XML is a markup language, not really an alternative to SQL. Perhaps you got confused by the term "xpath query".
If you use PDO then switching from mysql to sqlite or vice versa should be quite trivial.

Edit
Do note however that before things get to the point of exceptional loads you'll need to stress them A LOT. And rewriting queries in a more efficient manner usually means a far greater speed up than the actual database in use.
« Last Edit: June 12, 2009, 06:11:28 AM by Axeia »
Post PHP code like this: [php]#PHP code goes here.[/php]
And everything else like: [code]//codes goes here.[/code]