This is one of those things that seemed extremely difficult and
cumbersome, but turned out to be trivially simple, and relatively
painless. Here is the case:
Using PHP to generate XML documents from a MySQL Database
I am working with a MySQL database storing lots human readable text.
The text takes the form of semi-structured, well-formed XML. This particular
XML-format is based on a very small set of elements borrowed from
HTML and is used mostly for semantic markup of the text.
The XML fragments are fairly small, and not represent an end
product. They are part of a larger unit: ultimately, they are a
part of some document. The final document is not stored as a
whole, because it is conceived and maintained on the level of its
parts: all these individual XML fragments logically form distinct
units.
…
MySQL AB's recent changes to the Community/Enterprise split have made people go as far as calling the split a failure. I don't think it's working well either, but it could be fixed. Here's what I think would make Enterprise a compelling offer.
|
By now, everybody knows that I am quite fond of MySQL Proxy and with reason. Using a Proxy you
can add features without need of delving into the intricacies
of MySQL server code. One of the features that you can create with the Proxy, once you are familiar with its basic architecture (if you still aren't, you may check Getting started with MySQL Proxy) is a loop. So many times I catch myself doing things like
or
something like that. Why, oh why there is no FOR command in
MySQL syntax?
|
Some time ago, I created …
A friend of mine called me today, asking for advice on a baffling
error.
He has just finished upgrading a database server from 4.1.20 to
5.0.45but, when attempting a backup to all databases with
mysqldump, he gets a discomforting
message:
mysqldump: Got error: 1044:
Access denied for user 'root'@'localhost' to database 'information_schema'
when using LOCK TABLES
Of course, the error is doubly strange.
- First, because mysqldump is not supposed to attempt dumping the information schema. I know for sure, since I had to write a special script to dump the I_S when I really needed to export its data.
- Second, because there was actually …
I start to see applications being built utilizing VIEWs functionality which appeared in MySQL 5.0 and quite frequently VIEWs are used to help in writing the queries - to keep queries simple without really thinking how it affects server performance.
Even worse than that - looking at the short table which just gets single row from the table by the key we think this is simple query, while can be real monster instead with complexity hidden away in VIEW definition.
Just another day I worked on optimizing application which uses VIEWs and was looking at the long running query which just joined 2 tables... I ran EXPLAIN for it and got 200 of rows in the result set just for explain due to several layers of cascaded views built on top of one another so it is easy to write the queries, some of them it turn used subqueries subselects and derived tables.
It is also very dangerous if you assume MySQL would optimize your VIEWs same way …
[Read more]Yesterday I ran into the article which sheds some light on FaceBook search implementation. As we're recently a lot into search having implemented a bunch of search projects ourselves and helped number a of customers with their full text search needs I decided to post my thoughts on this matter.
First I was surprised article talks about just 1TB of data. I knew FaceBook has much more content than that. Though it seems the article only speaks about searching user profiles and similar global objects not full database of posts and comments. At FaceBook scale it is easy to fit 1TB in distributed memory which makes a lot of things easier.
Second this I was surprised about is about writing crawler for a site.... why would you do that if there is already information in the database which is much faster to extract. Even if data needs to be aggregated from …
[Read more]my girlfriend hates blogs :(
Yes! We did it! Just before I went to bed at 3:40AM (heh ), I noticed, that someone submitted new video to BTV. I’ve approved it instantly and then noticed a following information in the top part of the site: “We have 1000 videos / 569+ hours of high-quality content!” So, we broke trough 1k videos barrier! And we’ll try to do 2k videos before the end of this year, we have some new features in closed beta testing which would greatly increase number of submitted videos each day.
Thanks to all our users for their contributions and support! …
[Read more]MySQL AB’s recent changes to the Community/Enterprise split have made people go as far as calling the split a failure. I don’t think it’s working well either, but it could be fixed. Here’s what I think would make Enterprise a compelling offer. I’d recommend Enterprise if I could If the MySQL Enterprise Server were a good thing, I’d recommend it to my consulting clients. I’d suggest we start using it at my employer, too.
Friends are pointing me to the article saying SpyLOG, the startup which I co-founded back in 1999 was sold the other day to the MasterHost. The amount is not disclosed but it is estimated to be $3M - amount not worth mentioning for USA market but quite decent one for Russian Internet Market.
So I guess after all this project with not easy destiny can be called successful.
It is especially Interesting another month we announced our own startup project ClickAider which operates in related market. This deal reassures us there are money to be earned in the area.
In general looking back to my years spent with SpyLOG (1999-2002) I find them to be stressful but very rewarding in terms of knowledge and experience. We had great Development team with our team members later going to play important roles in projects like …
[Read more]