johnsmith153 Posted February 11, 2009 Share Posted February 11, 2009 Please only respond if you have actual experience that can compare. It would be pointless to just say "that sounds good/bad". Thanks. If anyone could do some tests of their own - now that would be good!! (just 3 or 4 would be enough) Thank you for all help - I need to make a decision and responses here will go a big way towards that - so this is pretty important to me. My site is very important and requires a good level of speed - it is not just a 2 visitor-per-day hobby site. I am NOT using MySQL, but I am using an API through php for the database. I would like to know if the API service I am using is very good. I.e would MySQL be quicker? What would you expect to get? The API is ran on a shared server - but shouldn't have too many domains. For the test, the main .php files were on a shared server with thousands of domains! For all tests there was no html output, and no php (other than is necessary - it is purely to test the database API) A WHILE loop was used to hit the API 100 times with an "insert" action for the 100 records below. Maybe FOR would be better, but it was done using WHILE. I think this is the best/only way. When I launch this site, I will use a dedicated server for my main files - and "could" get the database API company to provide a dedicated server (all at cost of course) - there is a good budget to get things right - but many pages already have been coded (and tested already) using the API rather than MySQL - so changing to MySQL would be a big job. The question is: Are these times any good - or should I look elsewhere for my database? ---------- Test 1: Add a new table, create 3 fields, add 100 records field1 and 2 were just 8 characters of garbage / field 3 was number 1-100 Then, pull all 100 records from the table and display to user. Time was between 0200-0300 GMT Times taken: (18 tests) seconds: 51 73 49 85 64 72 67 68 82 73 60 80 51 75 72 43 62 75 --------------- Test 2 was the same as above - but just adding 1 record and returning that 1 (6 tests) seconds 7 5 6 7 6 9 Thanks for reading. Quote Link to comment Share on other sites More sharing options...
btherl Posted February 11, 2009 Share Posted February 11, 2009 Those times are WAY WAY too slow, especially for such small rows. So I would look into what is taking the time. Database speeds are measured in transactions per second, but you are getting barely 1 or 2 simple inserts per second there (unless I have misunderstood). I would expect your entire 100 record test to finish in no more then 2-3 seconds. You should get that speed whether you use Mysql or Postgresql or anything else. It's possible that other users sharing the server are slowing it down. It's also possible that network latency is affecting things (network latency can be a real killer if you do many small queries). Is everything running on the same local network? Quote Link to comment Share on other sites More sharing options...
blueman378 Posted February 11, 2009 Share Posted February 11, 2009 i would suggest if you are able to post your database api here so we can look through the code and tell you how proficcient it is. Quote Link to comment Share on other sites More sharing options...
johnsmith153 Posted February 11, 2009 Author Share Posted February 11, 2009 I was unsure before posting, but thought it was a little slow. When btherl said 2-3 seconds I thought that was unlikely. I would take 10 seconds. I have actually spent a couple of hours learning MySQL - and have the results of the test. btherl, 2-3 seconds isn't correct - IT TOOK HALF A SECOND!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Good bye API !! The way btherl said how bad it was made me look into things further - I was close to accepting the API ! Thanks. Quote Link to comment Share on other sites More sharing options...
printf Posted February 11, 2009 Share Posted February 11, 2009 If you don't add indexes or optimize your table you can get slow results on both inserts and selects. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.