Domain: mysql.org
Stories and comments across the archive that link to mysql.org.
Comments · 59
-
A few things....
>One other limitation may bug a lot of PHP users - Postgres has no equivalent to MySQL's mysql_insertid() function call.
That's because Postgres doesn't support auto_increment, like mySQL does (it uses a sequence instead).
>MySQL begins collapsing at about 40-50 concurrent connections
What does "collapsing" mean?
>Research reveals that MySQL locks the entire table when an insert occurs
True, but did you read this? It gives tips on how to tune apps that have problems with table locking!
I think this article is crap - All they've done is imported identical data into the 2 databases and compared the results! - In the Real World, you'd performance tune the databases before putting them into production, therefore this isn't a valid comparison.
As an aside, what the hell is wrong with mysql.org? It's mashed! -
Some techniques
Some techniques that are essential to web development are:
- Write clean code. Straigtforward code that doesn't pull in a lot of extre libraries and functions will run better than spaghetti code.
- Use persistent database connections whenever you can, or use a small fast rdbms like MySQL.
- Caching, caching, caching!
- Turn buffering off whenever possible (e.g., $|++ in perl).
- Use compiled modules/languages whenever possible. Languages and environments like Perl (CGI, not mod_perl), PHP, ASP, and the like are *slow* in comparison to compiled C modules and things like mod_perl, mod_pyapache, and mod_dtcl. As much as people like embedded scripting languages, the fact is the page has to be parsed every time it is run (PHP folks, I mean you!) This makes for fast development (which is definitely important), but not so great for running.
- No JavaScript, no DHTML, no animated GIFs. Yeah, this goes against what a lot of people have been taught about the web, but they slow it the fuck down. A browser having to parse 300 lines of JavaScript (half of which is "if(userAgent == "Mozilla")" crap anyway) is going to be very slow, even on a BFM.
- And, dammit, write good HTML. In fact, don't write HTML, write XHTML. Nothing ruins the effect of a well-thought-out dynamic page than HTML that the browser has to re-render 6 times to lay out correctly. You may think this is not a big deal, but it is, it really is. Take the time to learn XHTML, and your pages will be better for it.
Often, the speed of the web is, in reality, how fast the pages appear to be. This is the most important thing to remember when designing pages that are supposed to be fast.
darren
Cthulhu for President! -
Re:Interbase and OthersSorry to burst your bubble, but MySQL is NOT using the GPL. From their website:
NOTE: This license is not the same as any of the GNU Licenses published by the Free Software Foundation. Its terms are substantially different from those of the GNU Licenses. If you are familiar with the GNU Licenses, please read this license with extra care.
This is found at http:/ /www.mysql.org/Manual_chapter/manual_Public_licens e.html#Public_license.Now they did release an older version (3.20.32a) under the GPL, but that is not nearly the same as releasing the latest versions. This has already been discussed extensively in this slashdot article.
--- -
Re:Comments on this informative post...
The continued popularity of MySQL amongst the open-source community continues to amaze me. MySQL is not open source. Go read their license. It's not even free as in beer. Almost incidentally, it's not a database either. Their is no transaction support which means that if your box goes down the database is likely to be in an incosistent state, and there is no easy way to fix it. The stunning thing is that their is a real database that is open source as well. PostgreSQL.
-
Re:MDAC is a DBMS??
My bad. You are correct, it's an API, (or maybe just a layer, I'm not sure). I was a little confused at that time. I thought I had installed MDAC 4 to add functionality that wasn't in the previous version, but I remember now that I installed to be able to add an Access 2000 ODBC source.
The original points still stand though. mySQL is nowhere near even Access because it lacks transactions and subselects. These are two very large problems with it. Another large problem for me is the lack of foreign keys, but that is from a data integrety perspective, not a functional one, so it's not such a big deal for most people. Her e are the missing mySQL functions. There isn't a real deadline on transactions yet either, although they will be adding in automic multistatements for the next version subnumber.
I want to start playing around with PostgreSQL, since it seems to have all the features I want in a linux dB.
-
Re:Linux applications
The GUI's end up being slow because they are processing text output
A little wrong there. Not all GUI apps with UI seperation need to read output text - the true seperation from UI is the option to output a number of ways. An example of this is something like MySQL results being sent to a PHP script. Quite a different format from the text output.
ps. All 'GDB' is an example of, is a badky designed app.
-
OpenBSD and Linux - compare?
We are a small Internet development shop, running a few servers and a mixed bag of development stations. Currently, there are three Linux boxen on our network, running the latest RedHat releases. We are looking to put in three more systems, for a total of 5 running some Linux/UNIX like OS.
When we perform this upgrade, we are willing to change operating systems if there is a demonstrable benefit. Due to recent slashdot postings we have started looking at OpenBSD as our server OS. Now, we do understand that RedHat is not the only Linux distribution available, but we don't really want to get into a Linux/Linux war here. We don;t mind changing if we should for technical reasons - but the Linux world seems more hip and vibrant, and we really like the penguin T-shirts we have... so if we can stay on Linux then we want to.
So far, we like what we hear about OpenBSD - but we don't know if the things we like are inherent in the relative designs of OpenBSD or if they are results of policy choices by the OpenBSD team. If they are the results of policy decisions, then with any luck a Linux distribution could be found that exhibited the same characteristics?
Features we like about OpenBSD:
- It seems like the release/testing cycle is extremely carefully controlled. While a freewheeling machine with lots of OpenSource code on the desktop is a good thing, for a server it seems that a smaller group exercising testing/release control is a more controlled system.
- The integrated crypto looks great, the one time use passwords look like a big winner here.
- There are a lot of references to OpenBSD's security and stability - but none with any specific examples or technical backing.
- The file layout on OpenBSD seems like a winner, it looks like things live in a well thought out and logical set up - not in a mishmash like RedHat.
Assumptions:
These systems will be running the server software they need, and X11 + (Gnome||KDE) for administration and so on. They will not be running the latest stuff from Linuxberg or a bunch of things that would be on a desktop OS. So we are going to try very hard not to introduce any instabilities. We aren't going to be compiling running games, sound drivers and the like that integrate directly into the kernel.
The questions are:
- Is OpenBSD more secure in some fundamental way that a well maintained Linux distribution?
- Is OpenBSD more stable than a well maintained Linux distribution?
- Will the OpenSource software we normally need (firewall, Apache, PHP4, Perl, Python) and so on probably compile on OpenBSD?
- Does OpenBSD have something like clustering support (Beowulf) and failover?
- Is the performance of a well maintained OpenBSD system better than a well maintained Linux distribution?
- Does Linux have anything like the one time use password system?
- Does OpenBSD support multiple CPU's better then Linux?
Thanks for taking the time, and hopefully we can keep the flames down to nothing and talk about technical issues this time.
-
MySQL
Mysql.org and Mysql.com are the USA mirror of Mysql.net the german site. So if
.com or .org is down, try .net. I cannot remember their other domain off the top of my head.
Also, as their site says: Our connection to the world has been down between Saturday 19991030 GMT 22.32 to Monday 19991101 GMT 17.10
--- -
a couple ideasSo some of the best things you can do have already been mentioned - split out your database from your front end webservers, let the backend have it's own machine and run raid 0+1 on the db server. The frontends won't need the raid since they'll be serving a lot of the static stuff out of cache.
Some other ideas, are to split image serving onto it's own apache, not necessarily it's own box. This apache can be completely pared down to absolute minimum modules, since all it will be doing is serving up static images. It also let's cache be used efficiently, since mostly the common images will be stored. As opposed to common images contending with common text files for cache space if images and content are served from the same apache.
Also, what are you using in apache to create dynamic pages and connect to the db? Use long running processes where possible, which means pick mod_perl, php, fastCGI, servlets, etc... over plain cgi scripts. This will save you lots of cycles and also let you have persistent db connections. Always a very good thing.
Taking the splitting out of machines to the next level, you could also try splitting all of your dynamic content to it's own machine, mod_proxied through your front end apache's. This makes the front ends very small since they barely need any modules installed at all. It also gets some extra performance out of your dynamic content apaches. Of course you're running a lot of boxes now.
:)Read this if you're running mod_perl. And read this to optimize your db.