Testimonials

http://tinyurl.com/gvwml

And the winner is….MySQL.
http://tinyurl.com/gvwml

And the winner is….MySQL.
Matt Asay wrote an article about open source leakage. It’s quite good, malady and got me thinking.

First I thought, “Open source companies do not ‘lose’ revenue to non-paying customers, they just do not gain revenue from them.” But that’s based on the model of open-source software I have in my head that open source software usually starts out as a free, collaborative effort, and if enough folks get enough steam and come up with a business model (aka “a way to get paid”), then they form a company around the open source software.

Simplifying that model: open source software is free until it’s not.

Saying there is leakage does not do justice to the fact that the river flowed freely until the company came along and dammed up the river. Sure, maybe there’s a big leak, but there’s a lot more not leaking than there is leaking.

But open source != free. And it’s not required, either.

Take a for-pay e-book. You buy a license for a personal copy of a book, and read it. You’re not supposed to make copies of the e-book, or redistribute it, etc under the terms of your license.

However, you can “delve into the source code” of an e-book. You cannot change it and redistribute it claiming you authored it. You can, however, change the words in the book to make it more meaningful for yourself. There’s nothing to stop you from annotating the work. The source is open — all the words are there for you to play with.

Now, open source is like that e-book. There’s nothing that says open source HAS to be free. By convention, it has been. Patents are good for keeping secrets and making money. The open source movement shuns patents. But they’re not shunning the making money. They’re shunning the secretive nature of it.

I once had a housemate who was vegan, whose brother owned a restaurant 3,000 miles away. She made the best vegan pancakes, and refused to give out the recipe because it was her brother’s secret recipe. Now, vegan pancakes are not that complicated. There are about 5 ingredients that could go into them. Why the need for the secret? Because her brother would lose business? Restaurants produce cookbooks all the time; I doubt business would die if the recipe got out.

And that’s what open source is all about — “I have this great recipe for vegan pancakes, and I want to share it with you.”

Let me be clear: I think that open source companies deserve to be paid for their work. Much of the time the products are excellent. That does not mean it’s bug-free. (I live in the United States, and I think it’s one of the best countries to live in, but that does not mean we do everything right….far from it!) Most of this is a semantic rant.

I find it amusing that it used to be difficult to convince big companies that open source was good, because upper management equated free with bad. Now that we’ve convinced some of them, we’re upset that it’s difficult to convince big companies that they should pay for something we give them for free.

I think MySQL actually has a sane licensing policy, and I think they’re going in the right direction with MySQL Network. Having free software and for-pay technical service and support seems like a good mix….for MySQL. I can certainly see that being abused by a company that has a bad product, intentionally, to get more $$ out of customers because they are forced to get support — much like Remedy requires lots of customization before it actually can work. MySQL is much better than that.

I think MySQL in particular would do well to offer “Optimization Consulting” for a fee. I know they offer that already, but particularly call it that, as I am always hearing about companies looking for a MySQL consultant for a few weeks to help them optimize their servers.
http://tinyurl.com/gvwml

And the winner is….MySQL.
Matt Asay wrote an article about open source leakage. It’s quite good, malady and got me thinking.

First I thought, “Open source companies do not ‘lose’ revenue to non-paying customers, they just do not gain revenue from them.” But that’s based on the model of open-source software I have in my head that open source software usually starts out as a free, collaborative effort, and if enough folks get enough steam and come up with a business model (aka “a way to get paid”), then they form a company around the open source software.

Simplifying that model: open source software is free until it’s not.

Saying there is leakage does not do justice to the fact that the river flowed freely until the company came along and dammed up the river. Sure, maybe there’s a big leak, but there’s a lot more not leaking than there is leaking.

But open source != free. And it’s not required, either.

Take a for-pay e-book. You buy a license for a personal copy of a book, and read it. You’re not supposed to make copies of the e-book, or redistribute it, etc under the terms of your license.

However, you can “delve into the source code” of an e-book. You cannot change it and redistribute it claiming you authored it. You can, however, change the words in the book to make it more meaningful for yourself. There’s nothing to stop you from annotating the work. The source is open — all the words are there for you to play with.

Now, open source is like that e-book. There’s nothing that says open source HAS to be free. By convention, it has been. Patents are good for keeping secrets and making money. The open source movement shuns patents. But they’re not shunning the making money. They’re shunning the secretive nature of it.

I once had a housemate who was vegan, whose brother owned a restaurant 3,000 miles away. She made the best vegan pancakes, and refused to give out the recipe because it was her brother’s secret recipe. Now, vegan pancakes are not that complicated. There are about 5 ingredients that could go into them. Why the need for the secret? Because her brother would lose business? Restaurants produce cookbooks all the time; I doubt business would die if the recipe got out.

And that’s what open source is all about — “I have this great recipe for vegan pancakes, and I want to share it with you.”

Let me be clear: I think that open source companies deserve to be paid for their work. Much of the time the products are excellent. That does not mean it’s bug-free. (I live in the United States, and I think it’s one of the best countries to live in, but that does not mean we do everything right….far from it!) Most of this is a semantic rant.

I find it amusing that it used to be difficult to convince big companies that open source was good, because upper management equated free with bad. Now that we’ve convinced some of them, we’re upset that it’s difficult to convince big companies that they should pay for something we give them for free.

I think MySQL actually has a sane licensing policy, and I think they’re going in the right direction with MySQL Network. Having free software and for-pay technical service and support seems like a good mix….for MySQL. I can certainly see that being abused by a company that has a bad product, intentionally, to get more $$ out of customers because they are forced to get support — much like Remedy requires lots of customization before it actually can work. MySQL is much better than that.

I think MySQL in particular would do well to offer “Optimization Consulting” for a fee. I know they offer that already, but particularly call it that, as I am always hearing about companies looking for a MySQL consultant for a few weeks to help them optimize their servers.
Note the title is “How I have a successful MySQL User Group.” There’s more than one way to do it, tuberculosis I’m sure. There are 3 basic principles:

1) Try to do as little work as possible.

2) Make your colleagues do as little work as possible.

3) Always have a topic/presentation

These three principles will get you far, site and should be weighted equally. Do not use principle # 1 as an excuse to not follow principle #3. As well, “doing work” includes “paying money”. With that being said:

  1. Make your user group easy to get to. This has different meanings for different areas. It may mean near a major highway interchange, it may mean near a mass transit station. Whatever it means for you, make it easy.
  2. When the Boston MySQL User Group first started, we had free space in an office building right in the city of Boston.

    Pros Cons
    Free Not enough parking
    Close to the subway and train station No free parking
    The street was clearly labeled We had to have a person stand by the door to let people in
    The building was clearly labeled
    There was a great pub next door

    Then we moved to a space at MIT:

    Pros Cons
    Free Passers-by eat the pizza and drink the soda
    Close to the subway and train station We had to have good maps to find the location
    Plenty of free parking

    Now, you may not be so lucky to find a place that will give you space for free. Consider local universities. Also, local libraries (university or otherwise) usually have some meeting space where they might be able to host you. Our first space, an office space, was gotten through a contact at MySQL. Contact some companies who use MySQL and ask if they’ll lend you space — most tech companies have folks there at night anyway, and it’s free advertising for the company! There is a book company near you, or a Pearson VUE center. Remember: it does not hurt to ask. The worst people can say is “no”, and if it’s contributing toward education, a book company (Pearson Education, Apress, O’Reilly, etc) might sponsor it.

    Getting a free space is key, particularly if it has A/V equipment for you to use (if you want to have lectures).

    Granted, if you want to just have a freeform discussion, any pub or coffee shop or location will do.

    You may think about having it in your home. Consider issues of personal safety, domestic distractions (kids, pets, etc), parking and transit, and the fact that most people feel comfortable going to their first meeting on “neutral” ground. However, if the culture surrounding where you live encourages it, go for it!

    If you must pay for a location, get a company to sponsor it. Get their monetary and time commitment in writing if you can (ie, they will sponsor for a year).

  3. Make the meetings easy to remember. Have them on the same day of the month (ie, 2nd Monday). Do not make them conflict with something similar (ie, PHP group, linux group). Try to have it at the same place each time.
  4. Figure out what your group wants and give it to them.
  5. Do they want lectures on specific topics? Maybe go to a place with wireless access and a “troubleshooting” meeting every so often. Maybe they want a blog with news, or war stories. Maybe a lending library would work. Anyone that comes to your meeting is looking for something. Ask each new member what they’re looking for. If they say “to learn more” then go with lectures — make sure to accomodate all skill sets, and have advanced lectures as well as beginning lectures. If they want to get to know each other better, go to a pub and talk about MySQL while you down a pint. Or run a charity fundraiser and donate the proceeds to a not-for-profit like the Electronic Freedom Foundation. There’s plenty the group can do, including having contests, or even starting a business together if you’re plucky.

  6. Have incentives.
  7. But remember rule #2, so keep costs as low as possible. Ask companies to sponsor dinner or light refreshments. Don’t be shy; ask book companies for books, T-shirts and buttons to give away as prizes. Again, the worst they can say is “no”, and I’ve found book companies and MySQL AB to be VERY accomodating, as well as local businesses. Ask company techies to present. Ask MySQL to send someone out to present.

  8. Be available, and follow up when you say you will. Often times folks will have a question. Being able to respond in a timely manner is important. But if you speak out and make regular annoucements, and solicit feedback, folks will know you are accomodating.
  9. Do not do work others can do. When someone asks if you can forward a job listing, have them post it to your group members. Or, better yet, have them come to your meeting and make an announcement in the first 5 minutes. This includes advertising! Find your local MySQL Sales Rep and ask them to help promote your group. Promote it on any site you can think of — in a blog, on Craigslist, heck, make flyers and post it around town if you have to. Get the word out there!
  10. Have the right attitude. It’s not your meeting, it’s your group’s meeting. If they want different topics, ask someone to research and present. It’s OK if the research isn’t perfect or complete; many times your group will fill in with their experiences.
  11. It’s OK to be wrong. No, really. If you don’t know the answer to a question, look it up later on, and follow up. Or ask the group if anyone knows. Also, presentations take time to make, and if you feel compelled to get every single detail right, they’ll take a lot longer. Keep an offline copy of the manual so you can look up anything you need to.
  12. Ask others for help. Even if you think you can do it better or faster. Your group should be able to survive without you, so if you can’t make a meeting all is not lost. This includes asking others to do a presentation of any length — it can be a 10 minute “this is how we use MySQL and this is what our setup looks like” to an hour or more. It does not have to be intimidating. Ask folks to present workshops they’re presenting at conferences, or present notes from conferences they go to. People need to feel like part of the group if the group is to be successful.
  13. If you can’t get a presentation, download one. MySQL is excellent at providing past webinars. Download it to your computer, and have a free lecture from an expert, that you can pause and rewind if you need to. MySQL Webinars. The Boston MySQL User Group videorecords the presentations and puts them online — see the links under “Presentations” at http://www.sheeri.net

Note: The Boston MySQL User Group is successful, but we don’t quite do everything above. I’d love to have more socialization, and I think once summer comes I’ll think of something geeky and fun to do outdoors, with little cost. Or maybe just a bowling trip.
http://tinyurl.com/gvwml

And the winner is….MySQL.
Matt Asay wrote an article about open source leakage. It’s quite good, malady and got me thinking.

First I thought, “Open source companies do not ‘lose’ revenue to non-paying customers, they just do not gain revenue from them.” But that’s based on the model of open-source software I have in my head that open source software usually starts out as a free, collaborative effort, and if enough folks get enough steam and come up with a business model (aka “a way to get paid”), then they form a company around the open source software.

Simplifying that model: open source software is free until it’s not.

Saying there is leakage does not do justice to the fact that the river flowed freely until the company came along and dammed up the river. Sure, maybe there’s a big leak, but there’s a lot more not leaking than there is leaking.

But open source != free. And it’s not required, either.

Take a for-pay e-book. You buy a license for a personal copy of a book, and read it. You’re not supposed to make copies of the e-book, or redistribute it, etc under the terms of your license.

However, you can “delve into the source code” of an e-book. You cannot change it and redistribute it claiming you authored it. You can, however, change the words in the book to make it more meaningful for yourself. There’s nothing to stop you from annotating the work. The source is open — all the words are there for you to play with.

Now, open source is like that e-book. There’s nothing that says open source HAS to be free. By convention, it has been. Patents are good for keeping secrets and making money. The open source movement shuns patents. But they’re not shunning the making money. They’re shunning the secretive nature of it.

I once had a housemate who was vegan, whose brother owned a restaurant 3,000 miles away. She made the best vegan pancakes, and refused to give out the recipe because it was her brother’s secret recipe. Now, vegan pancakes are not that complicated. There are about 5 ingredients that could go into them. Why the need for the secret? Because her brother would lose business? Restaurants produce cookbooks all the time; I doubt business would die if the recipe got out.

And that’s what open source is all about — “I have this great recipe for vegan pancakes, and I want to share it with you.”

Let me be clear: I think that open source companies deserve to be paid for their work. Much of the time the products are excellent. That does not mean it’s bug-free. (I live in the United States, and I think it’s one of the best countries to live in, but that does not mean we do everything right….far from it!) Most of this is a semantic rant.

I find it amusing that it used to be difficult to convince big companies that open source was good, because upper management equated free with bad. Now that we’ve convinced some of them, we’re upset that it’s difficult to convince big companies that they should pay for something we give them for free.

I think MySQL actually has a sane licensing policy, and I think they’re going in the right direction with MySQL Network. Having free software and for-pay technical service and support seems like a good mix….for MySQL. I can certainly see that being abused by a company that has a bad product, intentionally, to get more $$ out of customers because they are forced to get support — much like Remedy requires lots of customization before it actually can work. MySQL is much better than that.

I think MySQL in particular would do well to offer “Optimization Consulting” for a fee. I know they offer that already, but particularly call it that, as I am always hearing about companies looking for a MySQL consultant for a few weeks to help them optimize their servers.
Note the title is “How I have a successful MySQL User Group.” There’s more than one way to do it, tuberculosis I’m sure. There are 3 basic principles:

1) Try to do as little work as possible.

2) Make your colleagues do as little work as possible.

3) Always have a topic/presentation

These three principles will get you far, site and should be weighted equally. Do not use principle # 1 as an excuse to not follow principle #3. As well, “doing work” includes “paying money”. With that being said:

  1. Make your user group easy to get to. This has different meanings for different areas. It may mean near a major highway interchange, it may mean near a mass transit station. Whatever it means for you, make it easy.
  2. When the Boston MySQL User Group first started, we had free space in an office building right in the city of Boston.

    Pros Cons
    Free Not enough parking
    Close to the subway and train station No free parking
    The street was clearly labeled We had to have a person stand by the door to let people in
    The building was clearly labeled
    There was a great pub next door

    Then we moved to a space at MIT:

    Pros Cons
    Free Passers-by eat the pizza and drink the soda
    Close to the subway and train station We had to have good maps to find the location
    Plenty of free parking

    Now, you may not be so lucky to find a place that will give you space for free. Consider local universities. Also, local libraries (university or otherwise) usually have some meeting space where they might be able to host you. Our first space, an office space, was gotten through a contact at MySQL. Contact some companies who use MySQL and ask if they’ll lend you space — most tech companies have folks there at night anyway, and it’s free advertising for the company! There is a book company near you, or a Pearson VUE center. Remember: it does not hurt to ask. The worst people can say is “no”, and if it’s contributing toward education, a book company (Pearson Education, Apress, O’Reilly, etc) might sponsor it.

    Getting a free space is key, particularly if it has A/V equipment for you to use (if you want to have lectures).

    Granted, if you want to just have a freeform discussion, any pub or coffee shop or location will do.

    You may think about having it in your home. Consider issues of personal safety, domestic distractions (kids, pets, etc), parking and transit, and the fact that most people feel comfortable going to their first meeting on “neutral” ground. However, if the culture surrounding where you live encourages it, go for it!

    If you must pay for a location, get a company to sponsor it. Get their monetary and time commitment in writing if you can (ie, they will sponsor for a year).

  3. Make the meetings easy to remember. Have them on the same day of the month (ie, 2nd Monday). Do not make them conflict with something similar (ie, PHP group, linux group). Try to have it at the same place each time.
  4. Figure out what your group wants and give it to them.
  5. Do they want lectures on specific topics? Maybe go to a place with wireless access and a “troubleshooting” meeting every so often. Maybe they want a blog with news, or war stories. Maybe a lending library would work. Anyone that comes to your meeting is looking for something. Ask each new member what they’re looking for. If they say “to learn more” then go with lectures — make sure to accomodate all skill sets, and have advanced lectures as well as beginning lectures. If they want to get to know each other better, go to a pub and talk about MySQL while you down a pint. Or run a charity fundraiser and donate the proceeds to a not-for-profit like the Electronic Freedom Foundation. There’s plenty the group can do, including having contests, or even starting a business together if you’re plucky.

  6. Have incentives.
  7. But remember rule #2, so keep costs as low as possible. Ask companies to sponsor dinner or light refreshments. Don’t be shy; ask book companies for books, T-shirts and buttons to give away as prizes. Again, the worst they can say is “no”, and I’ve found book companies and MySQL AB to be VERY accomodating, as well as local businesses. Ask company techies to present. Ask MySQL to send someone out to present.

  8. Be available, and follow up when you say you will. Often times folks will have a question. Being able to respond in a timely manner is important. But if you speak out and make regular annoucements, and solicit feedback, folks will know you are accomodating.
  9. Do not do work others can do. When someone asks if you can forward a job listing, have them post it to your group members. Or, better yet, have them come to your meeting and make an announcement in the first 5 minutes. This includes advertising! Find your local MySQL Sales Rep and ask them to help promote your group. Promote it on any site you can think of — in a blog, on Craigslist, heck, make flyers and post it around town if you have to. Get the word out there!
  10. Have the right attitude. It’s not your meeting, it’s your group’s meeting. If they want different topics, ask someone to research and present. It’s OK if the research isn’t perfect or complete; many times your group will fill in with their experiences.
  11. It’s OK to be wrong. No, really. If you don’t know the answer to a question, look it up later on, and follow up. Or ask the group if anyone knows. Also, presentations take time to make, and if you feel compelled to get every single detail right, they’ll take a lot longer. Keep an offline copy of the manual so you can look up anything you need to.
  12. Ask others for help. Even if you think you can do it better or faster. Your group should be able to survive without you, so if you can’t make a meeting all is not lost. This includes asking others to do a presentation of any length — it can be a 10 minute “this is how we use MySQL and this is what our setup looks like” to an hour or more. It does not have to be intimidating. Ask folks to present workshops they’re presenting at conferences, or present notes from conferences they go to. People need to feel like part of the group if the group is to be successful.
  13. If you can’t get a presentation, download one. MySQL is excellent at providing past webinars. Download it to your computer, and have a free lecture from an expert, that you can pause and rewind if you need to. MySQL Webinars. The Boston MySQL User Group videorecords the presentations and puts them online — see the links under “Presentations” at http://www.sheeri.net

Note: The Boston MySQL User Group is successful, but we don’t quite do everything above. I’d love to have more socialization, and I think once summer comes I’ll think of something geeky and fun to do outdoors, with little cost. Or maybe just a bowling trip.
This falls under “I knew I could do this but I didn’t realize I could apply it this way!”

You can do

SELECT 1 from table1;

Which will return n rows, treatment each row having 1 field whose value is 1. n is the number of rows in table1.

SELECT "string" from table1 works similarly.

However, refractionist I never considered using

SELECT "string" as "debug statement" to debug code.

For instance,

mysql> SELECT "SELECT foo from bar where baz>0" as "debug";;
+---------------------------------+
| debug |
+---------------------------------+
| SELECT foo from bar where baz>0 |
+---------------------------------+
1 row in set (0.00 sec)

Neat trick! This is why I follow the MySQL Users general list, because every so often a gem like this comes up. Plus, I can’t resist helping folks out. And if I’m not accurate, someone else will step up.

Some more random thoughts, as I’m thinking about them and did not really want to make a separate post for them — at the MySQL Users Conference, the rank on PlanetMySQL.com came up, from “the conference postings will increase my rank” to “so-and-so cheats and makes lots of little posts.”

Now, I was just happy to make the list. Of course, now that I did post a lot at the conference, my rank went up from about #12 to about #7. As an experiment, I’m attempting to publish an average of one post a day for May and see what my ranking is at the end of May. So far, so good. And of course, as always, all of my posts will have content!

I think it would be neat to have a little line on planetmysql.com that shows where “1 post a day”, “1 post a week” and “1 post a month” fall for the top posters.
http://tinyurl.com/gvwml

And the winner is….MySQL.
Matt Asay wrote an article about open source leakage. It’s quite good, malady and got me thinking.

First I thought, “Open source companies do not ‘lose’ revenue to non-paying customers, they just do not gain revenue from them.” But that’s based on the model of open-source software I have in my head that open source software usually starts out as a free, collaborative effort, and if enough folks get enough steam and come up with a business model (aka “a way to get paid”), then they form a company around the open source software.

Simplifying that model: open source software is free until it’s not.

Saying there is leakage does not do justice to the fact that the river flowed freely until the company came along and dammed up the river. Sure, maybe there’s a big leak, but there’s a lot more not leaking than there is leaking.

But open source != free. And it’s not required, either.

Take a for-pay e-book. You buy a license for a personal copy of a book, and read it. You’re not supposed to make copies of the e-book, or redistribute it, etc under the terms of your license.

However, you can “delve into the source code” of an e-book. You cannot change it and redistribute it claiming you authored it. You can, however, change the words in the book to make it more meaningful for yourself. There’s nothing to stop you from annotating the work. The source is open — all the words are there for you to play with.

Now, open source is like that e-book. There’s nothing that says open source HAS to be free. By convention, it has been. Patents are good for keeping secrets and making money. The open source movement shuns patents. But they’re not shunning the making money. They’re shunning the secretive nature of it.

I once had a housemate who was vegan, whose brother owned a restaurant 3,000 miles away. She made the best vegan pancakes, and refused to give out the recipe because it was her brother’s secret recipe. Now, vegan pancakes are not that complicated. There are about 5 ingredients that could go into them. Why the need for the secret? Because her brother would lose business? Restaurants produce cookbooks all the time; I doubt business would die if the recipe got out.

And that’s what open source is all about — “I have this great recipe for vegan pancakes, and I want to share it with you.”

Let me be clear: I think that open source companies deserve to be paid for their work. Much of the time the products are excellent. That does not mean it’s bug-free. (I live in the United States, and I think it’s one of the best countries to live in, but that does not mean we do everything right….far from it!) Most of this is a semantic rant.

I find it amusing that it used to be difficult to convince big companies that open source was good, because upper management equated free with bad. Now that we’ve convinced some of them, we’re upset that it’s difficult to convince big companies that they should pay for something we give them for free.

I think MySQL actually has a sane licensing policy, and I think they’re going in the right direction with MySQL Network. Having free software and for-pay technical service and support seems like a good mix….for MySQL. I can certainly see that being abused by a company that has a bad product, intentionally, to get more $$ out of customers because they are forced to get support — much like Remedy requires lots of customization before it actually can work. MySQL is much better than that.

I think MySQL in particular would do well to offer “Optimization Consulting” for a fee. I know they offer that already, but particularly call it that, as I am always hearing about companies looking for a MySQL consultant for a few weeks to help them optimize their servers.
Note the title is “How I have a successful MySQL User Group.” There’s more than one way to do it, tuberculosis I’m sure. There are 3 basic principles:

1) Try to do as little work as possible.

2) Make your colleagues do as little work as possible.

3) Always have a topic/presentation

These three principles will get you far, site and should be weighted equally. Do not use principle # 1 as an excuse to not follow principle #3. As well, “doing work” includes “paying money”. With that being said:

  1. Make your user group easy to get to. This has different meanings for different areas. It may mean near a major highway interchange, it may mean near a mass transit station. Whatever it means for you, make it easy.
  2. When the Boston MySQL User Group first started, we had free space in an office building right in the city of Boston.

    Pros Cons
    Free Not enough parking
    Close to the subway and train station No free parking
    The street was clearly labeled We had to have a person stand by the door to let people in
    The building was clearly labeled
    There was a great pub next door

    Then we moved to a space at MIT:

    Pros Cons
    Free Passers-by eat the pizza and drink the soda
    Close to the subway and train station We had to have good maps to find the location
    Plenty of free parking

    Now, you may not be so lucky to find a place that will give you space for free. Consider local universities. Also, local libraries (university or otherwise) usually have some meeting space where they might be able to host you. Our first space, an office space, was gotten through a contact at MySQL. Contact some companies who use MySQL and ask if they’ll lend you space — most tech companies have folks there at night anyway, and it’s free advertising for the company! There is a book company near you, or a Pearson VUE center. Remember: it does not hurt to ask. The worst people can say is “no”, and if it’s contributing toward education, a book company (Pearson Education, Apress, O’Reilly, etc) might sponsor it.

    Getting a free space is key, particularly if it has A/V equipment for you to use (if you want to have lectures).

    Granted, if you want to just have a freeform discussion, any pub or coffee shop or location will do.

    You may think about having it in your home. Consider issues of personal safety, domestic distractions (kids, pets, etc), parking and transit, and the fact that most people feel comfortable going to their first meeting on “neutral” ground. However, if the culture surrounding where you live encourages it, go for it!

    If you must pay for a location, get a company to sponsor it. Get their monetary and time commitment in writing if you can (ie, they will sponsor for a year).

  3. Make the meetings easy to remember. Have them on the same day of the month (ie, 2nd Monday). Do not make them conflict with something similar (ie, PHP group, linux group). Try to have it at the same place each time.
  4. Figure out what your group wants and give it to them.
  5. Do they want lectures on specific topics? Maybe go to a place with wireless access and a “troubleshooting” meeting every so often. Maybe they want a blog with news, or war stories. Maybe a lending library would work. Anyone that comes to your meeting is looking for something. Ask each new member what they’re looking for. If they say “to learn more” then go with lectures — make sure to accomodate all skill sets, and have advanced lectures as well as beginning lectures. If they want to get to know each other better, go to a pub and talk about MySQL while you down a pint. Or run a charity fundraiser and donate the proceeds to a not-for-profit like the Electronic Freedom Foundation. There’s plenty the group can do, including having contests, or even starting a business together if you’re plucky.

  6. Have incentives.
  7. But remember rule #2, so keep costs as low as possible. Ask companies to sponsor dinner or light refreshments. Don’t be shy; ask book companies for books, T-shirts and buttons to give away as prizes. Again, the worst they can say is “no”, and I’ve found book companies and MySQL AB to be VERY accomodating, as well as local businesses. Ask company techies to present. Ask MySQL to send someone out to present.

  8. Be available, and follow up when you say you will. Often times folks will have a question. Being able to respond in a timely manner is important. But if you speak out and make regular annoucements, and solicit feedback, folks will know you are accomodating.
  9. Do not do work others can do. When someone asks if you can forward a job listing, have them post it to your group members. Or, better yet, have them come to your meeting and make an announcement in the first 5 minutes. This includes advertising! Find your local MySQL Sales Rep and ask them to help promote your group. Promote it on any site you can think of — in a blog, on Craigslist, heck, make flyers and post it around town if you have to. Get the word out there!
  10. Have the right attitude. It’s not your meeting, it’s your group’s meeting. If they want different topics, ask someone to research and present. It’s OK if the research isn’t perfect or complete; many times your group will fill in with their experiences.
  11. It’s OK to be wrong. No, really. If you don’t know the answer to a question, look it up later on, and follow up. Or ask the group if anyone knows. Also, presentations take time to make, and if you feel compelled to get every single detail right, they’ll take a lot longer. Keep an offline copy of the manual so you can look up anything you need to.
  12. Ask others for help. Even if you think you can do it better or faster. Your group should be able to survive without you, so if you can’t make a meeting all is not lost. This includes asking others to do a presentation of any length — it can be a 10 minute “this is how we use MySQL and this is what our setup looks like” to an hour or more. It does not have to be intimidating. Ask folks to present workshops they’re presenting at conferences, or present notes from conferences they go to. People need to feel like part of the group if the group is to be successful.
  13. If you can’t get a presentation, download one. MySQL is excellent at providing past webinars. Download it to your computer, and have a free lecture from an expert, that you can pause and rewind if you need to. MySQL Webinars. The Boston MySQL User Group videorecords the presentations and puts them online — see the links under “Presentations” at http://www.sheeri.net

Note: The Boston MySQL User Group is successful, but we don’t quite do everything above. I’d love to have more socialization, and I think once summer comes I’ll think of something geeky and fun to do outdoors, with little cost. Or maybe just a bowling trip.
This falls under “I knew I could do this but I didn’t realize I could apply it this way!”

You can do

SELECT 1 from table1;

Which will return n rows, treatment each row having 1 field whose value is 1. n is the number of rows in table1.

SELECT "string" from table1 works similarly.

However, refractionist I never considered using

SELECT "string" as "debug statement" to debug code.

For instance,

mysql> SELECT "SELECT foo from bar where baz>0" as "debug";;
+---------------------------------+
| debug |
+---------------------------------+
| SELECT foo from bar where baz>0 |
+---------------------------------+
1 row in set (0.00 sec)

Neat trick! This is why I follow the MySQL Users general list, because every so often a gem like this comes up. Plus, I can’t resist helping folks out. And if I’m not accurate, someone else will step up.

Some more random thoughts, as I’m thinking about them and did not really want to make a separate post for them — at the MySQL Users Conference, the rank on PlanetMySQL.com came up, from “the conference postings will increase my rank” to “so-and-so cheats and makes lots of little posts.”

Now, I was just happy to make the list. Of course, now that I did post a lot at the conference, my rank went up from about #12 to about #7. As an experiment, I’m attempting to publish an average of one post a day for May and see what my ranking is at the end of May. So far, so good. And of course, as always, all of my posts will have content!

I think it would be neat to have a little line on planetmysql.com that shows where “1 post a day”, “1 post a week” and “1 post a month” fall for the top posters.
One of the things I did this weekend was knit the pattern I’d made for Sakila, link the dolphin in the MySQL logo. Click on the image for a bigger picture:

The only problem is I have no idea what to do with it. I have more of the orange and blue yarn. I thought I would make it into a purse but it turned out much wider than I expected. I could make it into a big handbag but I don’t think I’d use it. Any suggestions?

The pattern itself:


dolphin: (56 sts wide by 59 rows)
When I say "k to stitch marker and remove", sickness I mean knit to the stitch marker, and take the stitch marker off.

cast on 56 sts.
knit 2 rows

I had to tweak the pattern mid-knit, so I *think* this is the correct pattern. If the count looks OK for rows 40-56 then there's nothing to worry about. Please let me know if you try this. I used size 9 needles and Lily Sugar & Cream Yarn in orange and navy blue. As you can see in the picture above, it turns out to be over a foot wide.

1) k4, p5, k1, place stitch marker, k to end
2) p to stitch marker & remove, k7, p3
3) k2, p3, k1, p6, k2, place stitch marker, k to end
4) p to stitch marker & remove, k4, p6, k2, p2
5) k2, p3, k6, p7, k4, place stitch marker, k to end
6) p to stitch marker & remove, k10, p6, k3, p3
7) k4, p2, k12, p5, k2, place stitch marker, k to end
8) p to stitch marker & remove, k6, p12, k3, p4
9) k5, p3, k14, p4, k2, place stitch marker, k to end
10) p to stitch marker & remove, k4, p16, k2, p to end
11) k6, p3, k5, p2, k9, p4, k1, place stitch marker, k to end
12) p to stitch marker & remove, k3, p10, k3, p4, k3, p to end
13) k7, p3, k5, p2, k11, p3, k1, place stitch marker, k to end
14) p to stitch marker & remove, k3, p19, k2, p to end
15) k8, p2, k20, p4, k1, place stitch marker, k to end
16) p to stitch marker & remove, k4, p20, k3, p to end
17) k8, p3, k21, p3, k1, place stitch marker, k to end
18) p to stitch marker & remove,k4, p20, k2, p to end
19) k10, p2, k21, p3, k1, place stitch marker, k to end
20) p to stitch marker & remove,k3, p21, k2, p to end
21) k11, p3, k21, p2, k1, place stitch marker, k to end
22) p to stitch marker & remove, k3, p21, k2, p to end
23) k12, p2, k22, p2, k1, place stitch marker, k to end
24) p to stitch marker & remove, k3, p23, k1, p to end
25) k12, p1, k23, p3, k1, place stitch marker, k to end
26) p to stitch marker & remove,k3, p24, k2, p to end
27) k11, p2, k25, p2, place stitch marker, k to end
28) p to stitch marker & remove, k2, p25, k3, p to end
29) k10, p2, k26, p3, place stitch marker, k to end
30) p to stitch marker & remove, k2, p27, k2, p to end
31) k10, p2, k5, p2, k20, p3, place stitch marker, k to end
32) p to stitch marker & remove, k2, p20, k3, p4, k3, p to end
33) k11, p2, k3, p4, k20, p3, k1, place stitch marker, k to end
34) p to stitch marker & remove, k3, p20, k5, p3, k2, p to end
35) k11, p2, k3, p5, k20, p4, k3, place stitch marker, k to end
36) p to stitch marker & remove, k6, p20, k3, p1, k2, p3, k1, p to end
37) k12, (*p2, k2* 2 times), p2, k22, p5, k1, place stitch marker, k to end
38) p to stitch marker & remove, k4, p23, k2, p3, k6, p to end
39) k13, p4, k4, p2, k25, p3, k1, place stitch marker, k to end
40) p to stitch marker & remove, k3, p25, k2, p5, k3, p to end
41) k23, p1, k26, p3, k4
42) p3, k3, p26, k2, place stitch marker, p to end
43) k to stitch marker & remove, p2, k26, p4, k2
44) p2, k8, p21, k2, place stitch marker, k1, p to end
45) k to stitch marker & remove, p2, k18, p8, k5
46) p9, k4, p17, k2, place stitch marker, k1, p to end
47) k to stitch marker & remove, p2, k18, p3, k9
48) p8, k4, p17, k2, place stitch marker, k1, p to end
49) k to stitch marker & remove, p3, k17, p4, k7
50) p5, k5, p18, k2, place stitch marker, p to end
51) k to stitch marker & remove, p3, k18, p4, k5
52) p5, k3, p19, k2 place stitch marker, p to end
53) k to stitch marker & remove, p3, k19, p2, k5
54) p4, k2, p19, k3, place stitch marker, p to end
55) k to stitch marker & remove, p4, k19, p2, k3
k 2 rows

http://tinyurl.com/gvwml

And the winner is….MySQL.
Matt Asay wrote an article about open source leakage. It’s quite good, malady and got me thinking.

First I thought, “Open source companies do not ‘lose’ revenue to non-paying customers, they just do not gain revenue from them.” But that’s based on the model of open-source software I have in my head that open source software usually starts out as a free, collaborative effort, and if enough folks get enough steam and come up with a business model (aka “a way to get paid”), then they form a company around the open source software.

Simplifying that model: open source software is free until it’s not.

Saying there is leakage does not do justice to the fact that the river flowed freely until the company came along and dammed up the river. Sure, maybe there’s a big leak, but there’s a lot more not leaking than there is leaking.

But open source != free. And it’s not required, either.

Take a for-pay e-book. You buy a license for a personal copy of a book, and read it. You’re not supposed to make copies of the e-book, or redistribute it, etc under the terms of your license.

However, you can “delve into the source code” of an e-book. You cannot change it and redistribute it claiming you authored it. You can, however, change the words in the book to make it more meaningful for yourself. There’s nothing to stop you from annotating the work. The source is open — all the words are there for you to play with.

Now, open source is like that e-book. There’s nothing that says open source HAS to be free. By convention, it has been. Patents are good for keeping secrets and making money. The open source movement shuns patents. But they’re not shunning the making money. They’re shunning the secretive nature of it.

I once had a housemate who was vegan, whose brother owned a restaurant 3,000 miles away. She made the best vegan pancakes, and refused to give out the recipe because it was her brother’s secret recipe. Now, vegan pancakes are not that complicated. There are about 5 ingredients that could go into them. Why the need for the secret? Because her brother would lose business? Restaurants produce cookbooks all the time; I doubt business would die if the recipe got out.

And that’s what open source is all about — “I have this great recipe for vegan pancakes, and I want to share it with you.”

Let me be clear: I think that open source companies deserve to be paid for their work. Much of the time the products are excellent. That does not mean it’s bug-free. (I live in the United States, and I think it’s one of the best countries to live in, but that does not mean we do everything right….far from it!) Most of this is a semantic rant.

I find it amusing that it used to be difficult to convince big companies that open source was good, because upper management equated free with bad. Now that we’ve convinced some of them, we’re upset that it’s difficult to convince big companies that they should pay for something we give them for free.

I think MySQL actually has a sane licensing policy, and I think they’re going in the right direction with MySQL Network. Having free software and for-pay technical service and support seems like a good mix….for MySQL. I can certainly see that being abused by a company that has a bad product, intentionally, to get more $$ out of customers because they are forced to get support — much like Remedy requires lots of customization before it actually can work. MySQL is much better than that.

I think MySQL in particular would do well to offer “Optimization Consulting” for a fee. I know they offer that already, but particularly call it that, as I am always hearing about companies looking for a MySQL consultant for a few weeks to help them optimize their servers.
Note the title is “How I have a successful MySQL User Group.” There’s more than one way to do it, tuberculosis I’m sure. There are 3 basic principles:

1) Try to do as little work as possible.

2) Make your colleagues do as little work as possible.

3) Always have a topic/presentation

These three principles will get you far, site and should be weighted equally. Do not use principle # 1 as an excuse to not follow principle #3. As well, “doing work” includes “paying money”. With that being said:

  1. Make your user group easy to get to. This has different meanings for different areas. It may mean near a major highway interchange, it may mean near a mass transit station. Whatever it means for you, make it easy.
  2. When the Boston MySQL User Group first started, we had free space in an office building right in the city of Boston.

    Pros Cons
    Free Not enough parking
    Close to the subway and train station No free parking
    The street was clearly labeled We had to have a person stand by the door to let people in
    The building was clearly labeled
    There was a great pub next door

    Then we moved to a space at MIT:

    Pros Cons
    Free Passers-by eat the pizza and drink the soda
    Close to the subway and train station We had to have good maps to find the location
    Plenty of free parking

    Now, you may not be so lucky to find a place that will give you space for free. Consider local universities. Also, local libraries (university or otherwise) usually have some meeting space where they might be able to host you. Our first space, an office space, was gotten through a contact at MySQL. Contact some companies who use MySQL and ask if they’ll lend you space — most tech companies have folks there at night anyway, and it’s free advertising for the company! There is a book company near you, or a Pearson VUE center. Remember: it does not hurt to ask. The worst people can say is “no”, and if it’s contributing toward education, a book company (Pearson Education, Apress, O’Reilly, etc) might sponsor it.

    Getting a free space is key, particularly if it has A/V equipment for you to use (if you want to have lectures).

    Granted, if you want to just have a freeform discussion, any pub or coffee shop or location will do.

    You may think about having it in your home. Consider issues of personal safety, domestic distractions (kids, pets, etc), parking and transit, and the fact that most people feel comfortable going to their first meeting on “neutral” ground. However, if the culture surrounding where you live encourages it, go for it!

    If you must pay for a location, get a company to sponsor it. Get their monetary and time commitment in writing if you can (ie, they will sponsor for a year).

  3. Make the meetings easy to remember. Have them on the same day of the month (ie, 2nd Monday). Do not make them conflict with something similar (ie, PHP group, linux group). Try to have it at the same place each time.
  4. Figure out what your group wants and give it to them.
  5. Do they want lectures on specific topics? Maybe go to a place with wireless access and a “troubleshooting” meeting every so often. Maybe they want a blog with news, or war stories. Maybe a lending library would work. Anyone that comes to your meeting is looking for something. Ask each new member what they’re looking for. If they say “to learn more” then go with lectures — make sure to accomodate all skill sets, and have advanced lectures as well as beginning lectures. If they want to get to know each other better, go to a pub and talk about MySQL while you down a pint. Or run a charity fundraiser and donate the proceeds to a not-for-profit like the Electronic Freedom Foundation. There’s plenty the group can do, including having contests, or even starting a business together if you’re plucky.

  6. Have incentives.
  7. But remember rule #2, so keep costs as low as possible. Ask companies to sponsor dinner or light refreshments. Don’t be shy; ask book companies for books, T-shirts and buttons to give away as prizes. Again, the worst they can say is “no”, and I’ve found book companies and MySQL AB to be VERY accomodating, as well as local businesses. Ask company techies to present. Ask MySQL to send someone out to present.

  8. Be available, and follow up when you say you will. Often times folks will have a question. Being able to respond in a timely manner is important. But if you speak out and make regular annoucements, and solicit feedback, folks will know you are accomodating.
  9. Do not do work others can do. When someone asks if you can forward a job listing, have them post it to your group members. Or, better yet, have them come to your meeting and make an announcement in the first 5 minutes. This includes advertising! Find your local MySQL Sales Rep and ask them to help promote your group. Promote it on any site you can think of — in a blog, on Craigslist, heck, make flyers and post it around town if you have to. Get the word out there!
  10. Have the right attitude. It’s not your meeting, it’s your group’s meeting. If they want different topics, ask someone to research and present. It’s OK if the research isn’t perfect or complete; many times your group will fill in with their experiences.
  11. It’s OK to be wrong. No, really. If you don’t know the answer to a question, look it up later on, and follow up. Or ask the group if anyone knows. Also, presentations take time to make, and if you feel compelled to get every single detail right, they’ll take a lot longer. Keep an offline copy of the manual so you can look up anything you need to.
  12. Ask others for help. Even if you think you can do it better or faster. Your group should be able to survive without you, so if you can’t make a meeting all is not lost. This includes asking others to do a presentation of any length — it can be a 10 minute “this is how we use MySQL and this is what our setup looks like” to an hour or more. It does not have to be intimidating. Ask folks to present workshops they’re presenting at conferences, or present notes from conferences they go to. People need to feel like part of the group if the group is to be successful.
  13. If you can’t get a presentation, download one. MySQL is excellent at providing past webinars. Download it to your computer, and have a free lecture from an expert, that you can pause and rewind if you need to. MySQL Webinars. The Boston MySQL User Group videorecords the presentations and puts them online — see the links under “Presentations” at http://www.sheeri.net

Note: The Boston MySQL User Group is successful, but we don’t quite do everything above. I’d love to have more socialization, and I think once summer comes I’ll think of something geeky and fun to do outdoors, with little cost. Or maybe just a bowling trip.
This falls under “I knew I could do this but I didn’t realize I could apply it this way!”

You can do

SELECT 1 from table1;

Which will return n rows, treatment each row having 1 field whose value is 1. n is the number of rows in table1.

SELECT "string" from table1 works similarly.

However, refractionist I never considered using

SELECT "string" as "debug statement" to debug code.

For instance,

mysql> SELECT "SELECT foo from bar where baz>0" as "debug";;
+---------------------------------+
| debug |
+---------------------------------+
| SELECT foo from bar where baz>0 |
+---------------------------------+
1 row in set (0.00 sec)

Neat trick! This is why I follow the MySQL Users general list, because every so often a gem like this comes up. Plus, I can’t resist helping folks out. And if I’m not accurate, someone else will step up.

Some more random thoughts, as I’m thinking about them and did not really want to make a separate post for them — at the MySQL Users Conference, the rank on PlanetMySQL.com came up, from “the conference postings will increase my rank” to “so-and-so cheats and makes lots of little posts.”

Now, I was just happy to make the list. Of course, now that I did post a lot at the conference, my rank went up from about #12 to about #7. As an experiment, I’m attempting to publish an average of one post a day for May and see what my ranking is at the end of May. So far, so good. And of course, as always, all of my posts will have content!

I think it would be neat to have a little line on planetmysql.com that shows where “1 post a day”, “1 post a week” and “1 post a month” fall for the top posters.
One of the things I did this weekend was knit the pattern I’d made for Sakila, link the dolphin in the MySQL logo. Click on the image for a bigger picture:

The only problem is I have no idea what to do with it. I have more of the orange and blue yarn. I thought I would make it into a purse but it turned out much wider than I expected. I could make it into a big handbag but I don’t think I’d use it. Any suggestions?

The pattern itself:


dolphin: (56 sts wide by 59 rows)
When I say "k to stitch marker and remove", sickness I mean knit to the stitch marker, and take the stitch marker off.

cast on 56 sts.
knit 2 rows

I had to tweak the pattern mid-knit, so I *think* this is the correct pattern. If the count looks OK for rows 40-56 then there's nothing to worry about. Please let me know if you try this. I used size 9 needles and Lily Sugar & Cream Yarn in orange and navy blue. As you can see in the picture above, it turns out to be over a foot wide.

1) k4, p5, k1, place stitch marker, k to end
2) p to stitch marker & remove, k7, p3
3) k2, p3, k1, p6, k2, place stitch marker, k to end
4) p to stitch marker & remove, k4, p6, k2, p2
5) k2, p3, k6, p7, k4, place stitch marker, k to end
6) p to stitch marker & remove, k10, p6, k3, p3
7) k4, p2, k12, p5, k2, place stitch marker, k to end
8) p to stitch marker & remove, k6, p12, k3, p4
9) k5, p3, k14, p4, k2, place stitch marker, k to end
10) p to stitch marker & remove, k4, p16, k2, p to end
11) k6, p3, k5, p2, k9, p4, k1, place stitch marker, k to end
12) p to stitch marker & remove, k3, p10, k3, p4, k3, p to end
13) k7, p3, k5, p2, k11, p3, k1, place stitch marker, k to end
14) p to stitch marker & remove, k3, p19, k2, p to end
15) k8, p2, k20, p4, k1, place stitch marker, k to end
16) p to stitch marker & remove, k4, p20, k3, p to end
17) k8, p3, k21, p3, k1, place stitch marker, k to end
18) p to stitch marker & remove,k4, p20, k2, p to end
19) k10, p2, k21, p3, k1, place stitch marker, k to end
20) p to stitch marker & remove,k3, p21, k2, p to end
21) k11, p3, k21, p2, k1, place stitch marker, k to end
22) p to stitch marker & remove, k3, p21, k2, p to end
23) k12, p2, k22, p2, k1, place stitch marker, k to end
24) p to stitch marker & remove, k3, p23, k1, p to end
25) k12, p1, k23, p3, k1, place stitch marker, k to end
26) p to stitch marker & remove,k3, p24, k2, p to end
27) k11, p2, k25, p2, place stitch marker, k to end
28) p to stitch marker & remove, k2, p25, k3, p to end
29) k10, p2, k26, p3, place stitch marker, k to end
30) p to stitch marker & remove, k2, p27, k2, p to end
31) k10, p2, k5, p2, k20, p3, place stitch marker, k to end
32) p to stitch marker & remove, k2, p20, k3, p4, k3, p to end
33) k11, p2, k3, p4, k20, p3, k1, place stitch marker, k to end
34) p to stitch marker & remove, k3, p20, k5, p3, k2, p to end
35) k11, p2, k3, p5, k20, p4, k3, place stitch marker, k to end
36) p to stitch marker & remove, k6, p20, k3, p1, k2, p3, k1, p to end
37) k12, (*p2, k2* 2 times), p2, k22, p5, k1, place stitch marker, k to end
38) p to stitch marker & remove, k4, p23, k2, p3, k6, p to end
39) k13, p4, k4, p2, k25, p3, k1, place stitch marker, k to end
40) p to stitch marker & remove, k3, p25, k2, p5, k3, p to end
41) k23, p1, k26, p3, k4
42) p3, k3, p26, k2, place stitch marker, p to end
43) k to stitch marker & remove, p2, k26, p4, k2
44) p2, k8, p21, k2, place stitch marker, k1, p to end
45) k to stitch marker & remove, p2, k18, p8, k5
46) p9, k4, p17, k2, place stitch marker, k1, p to end
47) k to stitch marker & remove, p2, k18, p3, k9
48) p8, k4, p17, k2, place stitch marker, k1, p to end
49) k to stitch marker & remove, p3, k17, p4, k7
50) p5, k5, p18, k2, place stitch marker, p to end
51) k to stitch marker & remove, p3, k18, p4, k5
52) p5, k3, p19, k2 place stitch marker, p to end
53) k to stitch marker & remove, p3, k19, p2, k5
54) p4, k2, p19, k3, place stitch marker, p to end
55) k to stitch marker & remove, p4, k19, p2, k3
k 2 rows

Edit: apparently as I was writing this, ed Dave put out the call for others to write their own. So, I *have* been asked….

I find Dave Rosenberg’s “How I Work” series fascinating, so I thought I would post how I work, and some tips I’ve picked up along the way.

I enjoyed How Brian Aker Works the best, mostly because some of the ideas were new and fresh to me — for example, polling e-mail every 30 minutes (and thinking about moving to once every hour).

Now, most people I know would say “But I MUST respond to e-mail, the faster the better!” To that I say, “What if you were in a meeting?” Most people will call if they want an immediate answer, and if you’re truly in a meeting, they’ll leave a voicemail message. I wouldn’t suggest polling your pager every 30 minutes, but for me, e-mail is a non-emergency medium and thus Brian’s technique is pure genius for not getting distracted by e-mail.

Not that anyone asked, but:

What is your role?
I am a MySQL Database for Online Buddies, Inc — a company committed to developing on-line communities that provide members with safe, friendly and exciting sites through which members can express themselves and interact with one another as they wish. (That’s straight from Marketing.)

What is your computer setup?
At work, a Dell desktop running Windows. It does not matter what OS I use as most of what I do involves logging into a database or server or researching/reading on the ‘net. I’m fond of saying “All I need is a web browser and a way to SSH and I’m happy.” At home I have a Windows laptop work gave me (also a Dell), although when I buy my own home computers they are Apple laptops.

What desktop software applications do you use daily?
Firefox. I find Safari (Mac OS X) bloated, taking too long to open. Internet Explorer is dead to me until they get tabbed browsing.

I also use Microsoft Outlook to deal with work e-mail, iTunes for music, and SecureCRT for SSH’ing. I’ll use Excel or Word for reporting and reading documents sent to me, but I only have to fire that up a few times a week.

I use Trillian for IM. I use EditPadLite for small text files I need to read on my desktop,

What websites do you visit every day?
gmail, planetmysql, http://gather.com, livejournal, http://everythingsysadmin.com/, and wunderground.com for the weather.

What mobile device or cell phone do you use?
I have a Motorola RAZR. I like the flip phone and the low weight, but some of the missing features (like being able to type more than one letter as an index to my phone book) really annoy me. I also have a Verizon PocketPC which I use during an emergency to login to our machines if I’m not near a computer.

Do you use IM?
Yes. For short technical requests or conversations, or “Have you done this yet?” I find it works well. Much like the phone, if I’m too busy to talk, I don’t respond. And much like the phone, people respect my need for few distractions and rarely use it. My colleagues walk into my office as much as they IM, and almost never call.

Do you use a VoIP phone?
Not yet, although one of my tasks this week is to start using Skype.

Do you have a personal organization theory?
Oh yes. I organize everything! I always need a to-do list, as I’m easily distracted. I keep it short — my to-do list is the tasks I expect to work on that day. I use the whiteboard in my office to keep track of weekly tasks and erase them when they are done — there are no more than a dozen at one time. There is always something new that comes up, so I’m never left with nothing on my list, and if I worry about something being forgotten I will put it into request tracking software. My high tendency toward distraction means I might put off certain tasks, but I do so by reading websites, journals, lists and researching. So I end up constantly learning and never needing to “find time” to read that technical magazine.

Physically I organize in piles. Mostly everything is in one to-do pile — ie, if I have a schema I’m modifying I’ll have it printed out with my notes. I’ll clean that out around once a week, and like the whiteboard, there’s never much in it. That’s not to say I’m busy, but if something is in there more than a few weeks, chances are it does not belong there.

I have always had some kind of organizer/planner. It’s something that needs to be small enough to take with me. I learned early on that paper is better than electronics for me, as I can drop my paper organizer all I want with no consequences. It does not sync to my desktop, but I also don’t have to worry about losing data. If I got along better with electronics I’d have a palm synched with LifeBalance. I love the software, but remembering to print out my schedule so I’d have a copy on me at all times did not work.

Anything else?
I cannot recommend Limoncelli’s Time Management for System Administrators (published by O’Reilly) enough if you are finding your current way of working not good enough, or even if you think it’s good enough and want to be sure.

I’d love to see other folks’ ways of working.
http://tinyurl.com/gvwml

And the winner is….MySQL.
Matt Asay wrote an article about open source leakage. It’s quite good, malady and got me thinking.

First I thought, “Open source companies do not ‘lose’ revenue to non-paying customers, they just do not gain revenue from them.” But that’s based on the model of open-source software I have in my head that open source software usually starts out as a free, collaborative effort, and if enough folks get enough steam and come up with a business model (aka “a way to get paid”), then they form a company around the open source software.

Simplifying that model: open source software is free until it’s not.

Saying there is leakage does not do justice to the fact that the river flowed freely until the company came along and dammed up the river. Sure, maybe there’s a big leak, but there’s a lot more not leaking than there is leaking.

But open source != free. And it’s not required, either.

Take a for-pay e-book. You buy a license for a personal copy of a book, and read it. You’re not supposed to make copies of the e-book, or redistribute it, etc under the terms of your license.

However, you can “delve into the source code” of an e-book. You cannot change it and redistribute it claiming you authored it. You can, however, change the words in the book to make it more meaningful for yourself. There’s nothing to stop you from annotating the work. The source is open — all the words are there for you to play with.

Now, open source is like that e-book. There’s nothing that says open source HAS to be free. By convention, it has been. Patents are good for keeping secrets and making money. The open source movement shuns patents. But they’re not shunning the making money. They’re shunning the secretive nature of it.

I once had a housemate who was vegan, whose brother owned a restaurant 3,000 miles away. She made the best vegan pancakes, and refused to give out the recipe because it was her brother’s secret recipe. Now, vegan pancakes are not that complicated. There are about 5 ingredients that could go into them. Why the need for the secret? Because her brother would lose business? Restaurants produce cookbooks all the time; I doubt business would die if the recipe got out.

And that’s what open source is all about — “I have this great recipe for vegan pancakes, and I want to share it with you.”

Let me be clear: I think that open source companies deserve to be paid for their work. Much of the time the products are excellent. That does not mean it’s bug-free. (I live in the United States, and I think it’s one of the best countries to live in, but that does not mean we do everything right….far from it!) Most of this is a semantic rant.

I find it amusing that it used to be difficult to convince big companies that open source was good, because upper management equated free with bad. Now that we’ve convinced some of them, we’re upset that it’s difficult to convince big companies that they should pay for something we give them for free.

I think MySQL actually has a sane licensing policy, and I think they’re going in the right direction with MySQL Network. Having free software and for-pay technical service and support seems like a good mix….for MySQL. I can certainly see that being abused by a company that has a bad product, intentionally, to get more $$ out of customers because they are forced to get support — much like Remedy requires lots of customization before it actually can work. MySQL is much better than that.

I think MySQL in particular would do well to offer “Optimization Consulting” for a fee. I know they offer that already, but particularly call it that, as I am always hearing about companies looking for a MySQL consultant for a few weeks to help them optimize their servers.
Note the title is “How I have a successful MySQL User Group.” There’s more than one way to do it, tuberculosis I’m sure. There are 3 basic principles:

1) Try to do as little work as possible.

2) Make your colleagues do as little work as possible.

3) Always have a topic/presentation

These three principles will get you far, site and should be weighted equally. Do not use principle # 1 as an excuse to not follow principle #3. As well, “doing work” includes “paying money”. With that being said:

  1. Make your user group easy to get to. This has different meanings for different areas. It may mean near a major highway interchange, it may mean near a mass transit station. Whatever it means for you, make it easy.
  2. When the Boston MySQL User Group first started, we had free space in an office building right in the city of Boston.

    Pros Cons
    Free Not enough parking
    Close to the subway and train station No free parking
    The street was clearly labeled We had to have a person stand by the door to let people in
    The building was clearly labeled
    There was a great pub next door

    Then we moved to a space at MIT:

    Pros Cons
    Free Passers-by eat the pizza and drink the soda
    Close to the subway and train station We had to have good maps to find the location
    Plenty of free parking

    Now, you may not be so lucky to find a place that will give you space for free. Consider local universities. Also, local libraries (university or otherwise) usually have some meeting space where they might be able to host you. Our first space, an office space, was gotten through a contact at MySQL. Contact some companies who use MySQL and ask if they’ll lend you space — most tech companies have folks there at night anyway, and it’s free advertising for the company! There is a book company near you, or a Pearson VUE center. Remember: it does not hurt to ask. The worst people can say is “no”, and if it’s contributing toward education, a book company (Pearson Education, Apress, O’Reilly, etc) might sponsor it.

    Getting a free space is key, particularly if it has A/V equipment for you to use (if you want to have lectures).

    Granted, if you want to just have a freeform discussion, any pub or coffee shop or location will do.

    You may think about having it in your home. Consider issues of personal safety, domestic distractions (kids, pets, etc), parking and transit, and the fact that most people feel comfortable going to their first meeting on “neutral” ground. However, if the culture surrounding where you live encourages it, go for it!

    If you must pay for a location, get a company to sponsor it. Get their monetary and time commitment in writing if you can (ie, they will sponsor for a year).

  3. Make the meetings easy to remember. Have them on the same day of the month (ie, 2nd Monday). Do not make them conflict with something similar (ie, PHP group, linux group). Try to have it at the same place each time.
  4. Figure out what your group wants and give it to them.
  5. Do they want lectures on specific topics? Maybe go to a place with wireless access and a “troubleshooting” meeting every so often. Maybe they want a blog with news, or war stories. Maybe a lending library would work. Anyone that comes to your meeting is looking for something. Ask each new member what they’re looking for. If they say “to learn more” then go with lectures — make sure to accomodate all skill sets, and have advanced lectures as well as beginning lectures. If they want to get to know each other better, go to a pub and talk about MySQL while you down a pint. Or run a charity fundraiser and donate the proceeds to a not-for-profit like the Electronic Freedom Foundation. There’s plenty the group can do, including having contests, or even starting a business together if you’re plucky.

  6. Have incentives.
  7. But remember rule #2, so keep costs as low as possible. Ask companies to sponsor dinner or light refreshments. Don’t be shy; ask book companies for books, T-shirts and buttons to give away as prizes. Again, the worst they can say is “no”, and I’ve found book companies and MySQL AB to be VERY accomodating, as well as local businesses. Ask company techies to present. Ask MySQL to send someone out to present.

  8. Be available, and follow up when you say you will. Often times folks will have a question. Being able to respond in a timely manner is important. But if you speak out and make regular annoucements, and solicit feedback, folks will know you are accomodating.
  9. Do not do work others can do. When someone asks if you can forward a job listing, have them post it to your group members. Or, better yet, have them come to your meeting and make an announcement in the first 5 minutes. This includes advertising! Find your local MySQL Sales Rep and ask them to help promote your group. Promote it on any site you can think of — in a blog, on Craigslist, heck, make flyers and post it around town if you have to. Get the word out there!
  10. Have the right attitude. It’s not your meeting, it’s your group’s meeting. If they want different topics, ask someone to research and present. It’s OK if the research isn’t perfect or complete; many times your group will fill in with their experiences.
  11. It’s OK to be wrong. No, really. If you don’t know the answer to a question, look it up later on, and follow up. Or ask the group if anyone knows. Also, presentations take time to make, and if you feel compelled to get every single detail right, they’ll take a lot longer. Keep an offline copy of the manual so you can look up anything you need to.
  12. Ask others for help. Even if you think you can do it better or faster. Your group should be able to survive without you, so if you can’t make a meeting all is not lost. This includes asking others to do a presentation of any length — it can be a 10 minute “this is how we use MySQL and this is what our setup looks like” to an hour or more. It does not have to be intimidating. Ask folks to present workshops they’re presenting at conferences, or present notes from conferences they go to. People need to feel like part of the group if the group is to be successful.
  13. If you can’t get a presentation, download one. MySQL is excellent at providing past webinars. Download it to your computer, and have a free lecture from an expert, that you can pause and rewind if you need to. MySQL Webinars. The Boston MySQL User Group videorecords the presentations and puts them online — see the links under “Presentations” at http://www.sheeri.net

Note: The Boston MySQL User Group is successful, but we don’t quite do everything above. I’d love to have more socialization, and I think once summer comes I’ll think of something geeky and fun to do outdoors, with little cost. Or maybe just a bowling trip.
This falls under “I knew I could do this but I didn’t realize I could apply it this way!”

You can do

SELECT 1 from table1;

Which will return n rows, treatment each row having 1 field whose value is 1. n is the number of rows in table1.

SELECT "string" from table1 works similarly.

However, refractionist I never considered using

SELECT "string" as "debug statement" to debug code.

For instance,

mysql> SELECT "SELECT foo from bar where baz>0" as "debug";;
+---------------------------------+
| debug |
+---------------------------------+
| SELECT foo from bar where baz>0 |
+---------------------------------+
1 row in set (0.00 sec)

Neat trick! This is why I follow the MySQL Users general list, because every so often a gem like this comes up. Plus, I can’t resist helping folks out. And if I’m not accurate, someone else will step up.

Some more random thoughts, as I’m thinking about them and did not really want to make a separate post for them — at the MySQL Users Conference, the rank on PlanetMySQL.com came up, from “the conference postings will increase my rank” to “so-and-so cheats and makes lots of little posts.”

Now, I was just happy to make the list. Of course, now that I did post a lot at the conference, my rank went up from about #12 to about #7. As an experiment, I’m attempting to publish an average of one post a day for May and see what my ranking is at the end of May. So far, so good. And of course, as always, all of my posts will have content!

I think it would be neat to have a little line on planetmysql.com that shows where “1 post a day”, “1 post a week” and “1 post a month” fall for the top posters.
One of the things I did this weekend was knit the pattern I’d made for Sakila, link the dolphin in the MySQL logo. Click on the image for a bigger picture:

The only problem is I have no idea what to do with it. I have more of the orange and blue yarn. I thought I would make it into a purse but it turned out much wider than I expected. I could make it into a big handbag but I don’t think I’d use it. Any suggestions?

The pattern itself:


dolphin: (56 sts wide by 59 rows)
When I say "k to stitch marker and remove", sickness I mean knit to the stitch marker, and take the stitch marker off.

cast on 56 sts.
knit 2 rows

I had to tweak the pattern mid-knit, so I *think* this is the correct pattern. If the count looks OK for rows 40-56 then there's nothing to worry about. Please let me know if you try this. I used size 9 needles and Lily Sugar & Cream Yarn in orange and navy blue. As you can see in the picture above, it turns out to be over a foot wide.

1) k4, p5, k1, place stitch marker, k to end
2) p to stitch marker & remove, k7, p3
3) k2, p3, k1, p6, k2, place stitch marker, k to end
4) p to stitch marker & remove, k4, p6, k2, p2
5) k2, p3, k6, p7, k4, place stitch marker, k to end
6) p to stitch marker & remove, k10, p6, k3, p3
7) k4, p2, k12, p5, k2, place stitch marker, k to end
8) p to stitch marker & remove, k6, p12, k3, p4
9) k5, p3, k14, p4, k2, place stitch marker, k to end
10) p to stitch marker & remove, k4, p16, k2, p to end
11) k6, p3, k5, p2, k9, p4, k1, place stitch marker, k to end
12) p to stitch marker & remove, k3, p10, k3, p4, k3, p to end
13) k7, p3, k5, p2, k11, p3, k1, place stitch marker, k to end
14) p to stitch marker & remove, k3, p19, k2, p to end
15) k8, p2, k20, p4, k1, place stitch marker, k to end
16) p to stitch marker & remove, k4, p20, k3, p to end
17) k8, p3, k21, p3, k1, place stitch marker, k to end
18) p to stitch marker & remove,k4, p20, k2, p to end
19) k10, p2, k21, p3, k1, place stitch marker, k to end
20) p to stitch marker & remove,k3, p21, k2, p to end
21) k11, p3, k21, p2, k1, place stitch marker, k to end
22) p to stitch marker & remove, k3, p21, k2, p to end
23) k12, p2, k22, p2, k1, place stitch marker, k to end
24) p to stitch marker & remove, k3, p23, k1, p to end
25) k12, p1, k23, p3, k1, place stitch marker, k to end
26) p to stitch marker & remove,k3, p24, k2, p to end
27) k11, p2, k25, p2, place stitch marker, k to end
28) p to stitch marker & remove, k2, p25, k3, p to end
29) k10, p2, k26, p3, place stitch marker, k to end
30) p to stitch marker & remove, k2, p27, k2, p to end
31) k10, p2, k5, p2, k20, p3, place stitch marker, k to end
32) p to stitch marker & remove, k2, p20, k3, p4, k3, p to end
33) k11, p2, k3, p4, k20, p3, k1, place stitch marker, k to end
34) p to stitch marker & remove, k3, p20, k5, p3, k2, p to end
35) k11, p2, k3, p5, k20, p4, k3, place stitch marker, k to end
36) p to stitch marker & remove, k6, p20, k3, p1, k2, p3, k1, p to end
37) k12, (*p2, k2* 2 times), p2, k22, p5, k1, place stitch marker, k to end
38) p to stitch marker & remove, k4, p23, k2, p3, k6, p to end
39) k13, p4, k4, p2, k25, p3, k1, place stitch marker, k to end
40) p to stitch marker & remove, k3, p25, k2, p5, k3, p to end
41) k23, p1, k26, p3, k4
42) p3, k3, p26, k2, place stitch marker, p to end
43) k to stitch marker & remove, p2, k26, p4, k2
44) p2, k8, p21, k2, place stitch marker, k1, p to end
45) k to stitch marker & remove, p2, k18, p8, k5
46) p9, k4, p17, k2, place stitch marker, k1, p to end
47) k to stitch marker & remove, p2, k18, p3, k9
48) p8, k4, p17, k2, place stitch marker, k1, p to end
49) k to stitch marker & remove, p3, k17, p4, k7
50) p5, k5, p18, k2, place stitch marker, p to end
51) k to stitch marker & remove, p3, k18, p4, k5
52) p5, k3, p19, k2 place stitch marker, p to end
53) k to stitch marker & remove, p3, k19, p2, k5
54) p4, k2, p19, k3, place stitch marker, p to end
55) k to stitch marker & remove, p4, k19, p2, k3
k 2 rows

Edit: apparently as I was writing this, ed Dave put out the call for others to write their own. So, I *have* been asked….

I find Dave Rosenberg’s “How I Work” series fascinating, so I thought I would post how I work, and some tips I’ve picked up along the way.

I enjoyed How Brian Aker Works the best, mostly because some of the ideas were new and fresh to me — for example, polling e-mail every 30 minutes (and thinking about moving to once every hour).

Now, most people I know would say “But I MUST respond to e-mail, the faster the better!” To that I say, “What if you were in a meeting?” Most people will call if they want an immediate answer, and if you’re truly in a meeting, they’ll leave a voicemail message. I wouldn’t suggest polling your pager every 30 minutes, but for me, e-mail is a non-emergency medium and thus Brian’s technique is pure genius for not getting distracted by e-mail.

Not that anyone asked, but:

What is your role?
I am a MySQL Database for Online Buddies, Inc — a company committed to developing on-line communities that provide members with safe, friendly and exciting sites through which members can express themselves and interact with one another as they wish. (That’s straight from Marketing.)

What is your computer setup?
At work, a Dell desktop running Windows. It does not matter what OS I use as most of what I do involves logging into a database or server or researching/reading on the ‘net. I’m fond of saying “All I need is a web browser and a way to SSH and I’m happy.” At home I have a Windows laptop work gave me (also a Dell), although when I buy my own home computers they are Apple laptops.

What desktop software applications do you use daily?
Firefox. I find Safari (Mac OS X) bloated, taking too long to open. Internet Explorer is dead to me until they get tabbed browsing.

I also use Microsoft Outlook to deal with work e-mail, iTunes for music, and SecureCRT for SSH’ing. I’ll use Excel or Word for reporting and reading documents sent to me, but I only have to fire that up a few times a week.

I use Trillian for IM. I use EditPadLite for small text files I need to read on my desktop,

What websites do you visit every day?
gmail, planetmysql, http://gather.com, livejournal, http://everythingsysadmin.com/, and wunderground.com for the weather.

What mobile device or cell phone do you use?
I have a Motorola RAZR. I like the flip phone and the low weight, but some of the missing features (like being able to type more than one letter as an index to my phone book) really annoy me. I also have a Verizon PocketPC which I use during an emergency to login to our machines if I’m not near a computer.

Do you use IM?
Yes. For short technical requests or conversations, or “Have you done this yet?” I find it works well. Much like the phone, if I’m too busy to talk, I don’t respond. And much like the phone, people respect my need for few distractions and rarely use it. My colleagues walk into my office as much as they IM, and almost never call.

Do you use a VoIP phone?
Not yet, although one of my tasks this week is to start using Skype.

Do you have a personal organization theory?
Oh yes. I organize everything! I always need a to-do list, as I’m easily distracted. I keep it short — my to-do list is the tasks I expect to work on that day. I use the whiteboard in my office to keep track of weekly tasks and erase them when they are done — there are no more than a dozen at one time. There is always something new that comes up, so I’m never left with nothing on my list, and if I worry about something being forgotten I will put it into request tracking software. My high tendency toward distraction means I might put off certain tasks, but I do so by reading websites, journals, lists and researching. So I end up constantly learning and never needing to “find time” to read that technical magazine.

Physically I organize in piles. Mostly everything is in one to-do pile — ie, if I have a schema I’m modifying I’ll have it printed out with my notes. I’ll clean that out around once a week, and like the whiteboard, there’s never much in it. That’s not to say I’m busy, but if something is in there more than a few weeks, chances are it does not belong there.

I have always had some kind of organizer/planner. It’s something that needs to be small enough to take with me. I learned early on that paper is better than electronics for me, as I can drop my paper organizer all I want with no consequences. It does not sync to my desktop, but I also don’t have to worry about losing data. If I got along better with electronics I’d have a palm synched with LifeBalance. I love the software, but remembering to print out my schedule so I’d have a copy on me at all times did not work.

Anything else?
I cannot recommend Limoncelli’s Time Management for System Administrators (published by O’Reilly) enough if you are finding your current way of working not good enough, or even if you think it’s good enough and want to be sure.

I’d love to see other folks’ ways of working.
So, anorexia I try to answer questions on the mysql users list. It usually frustrates me, somnology but I also want to help. And often, I learn things.

My 2nd biggest pet peeve is that people don’t think to Google their findings. Or even “MySQL” their findings. If you have a short phrase or word, type the following into your address bar and MySQL does the right thing:

http://www.mysql.com/short word or phrase

try it:

http://www.mysql.com/replication
http://www.mysql.com/insert syntax
http://www.mysql.com/can’t%20connect

The bigger pet peeve I have is that people are AFRAID. They shake in their boots if there’s something they don’t understand. This is why there are such things as test servers. Most of the time you can run a query on a test server and see if it does the right thing.

We’re not creating bombs here. Sure, if you mess up a delete query you might mess up your system. But a SELECT query can always be “kill” ed. And a test server does not care if you delete data.

There’s no excuse for not having a test server. MySQL is available for many platforms. It’s plenty easy to mysqldump your schema, and your data too. Have lots of data? Use SELECT and LIMIT.

It’s quite frustrating as someone who helps people to get the attitude of “I don’t know what to do?!!?” So yes, when someone says “Would this work?” it makes me want to scream. Wouldn’t it be easier for you to try it, than to have me set up a test scenario for you?

Now of course, this is different from the “This should work and does not, why?” and that’s OK.
http://tinyurl.com/gvwml

And the winner is….MySQL.
Matt Asay wrote an article about open source leakage. It’s quite good, malady and got me thinking.

First I thought, “Open source companies do not ‘lose’ revenue to non-paying customers, they just do not gain revenue from them.” But that’s based on the model of open-source software I have in my head that open source software usually starts out as a free, collaborative effort, and if enough folks get enough steam and come up with a business model (aka “a way to get paid”), then they form a company around the open source software.

Simplifying that model: open source software is free until it’s not.

Saying there is leakage does not do justice to the fact that the river flowed freely until the company came along and dammed up the river. Sure, maybe there’s a big leak, but there’s a lot more not leaking than there is leaking.

But open source != free. And it’s not required, either.

Take a for-pay e-book. You buy a license for a personal copy of a book, and read it. You’re not supposed to make copies of the e-book, or redistribute it, etc under the terms of your license.

However, you can “delve into the source code” of an e-book. You cannot change it and redistribute it claiming you authored it. You can, however, change the words in the book to make it more meaningful for yourself. There’s nothing to stop you from annotating the work. The source is open — all the words are there for you to play with.

Now, open source is like that e-book. There’s nothing that says open source HAS to be free. By convention, it has been. Patents are good for keeping secrets and making money. The open source movement shuns patents. But they’re not shunning the making money. They’re shunning the secretive nature of it.

I once had a housemate who was vegan, whose brother owned a restaurant 3,000 miles away. She made the best vegan pancakes, and refused to give out the recipe because it was her brother’s secret recipe. Now, vegan pancakes are not that complicated. There are about 5 ingredients that could go into them. Why the need for the secret? Because her brother would lose business? Restaurants produce cookbooks all the time; I doubt business would die if the recipe got out.

And that’s what open source is all about — “I have this great recipe for vegan pancakes, and I want to share it with you.”

Let me be clear: I think that open source companies deserve to be paid for their work. Much of the time the products are excellent. That does not mean it’s bug-free. (I live in the United States, and I think it’s one of the best countries to live in, but that does not mean we do everything right….far from it!) Most of this is a semantic rant.

I find it amusing that it used to be difficult to convince big companies that open source was good, because upper management equated free with bad. Now that we’ve convinced some of them, we’re upset that it’s difficult to convince big companies that they should pay for something we give them for free.

I think MySQL actually has a sane licensing policy, and I think they’re going in the right direction with MySQL Network. Having free software and for-pay technical service and support seems like a good mix….for MySQL. I can certainly see that being abused by a company that has a bad product, intentionally, to get more $$ out of customers because they are forced to get support — much like Remedy requires lots of customization before it actually can work. MySQL is much better than that.

I think MySQL in particular would do well to offer “Optimization Consulting” for a fee. I know they offer that already, but particularly call it that, as I am always hearing about companies looking for a MySQL consultant for a few weeks to help them optimize their servers.
Note the title is “How I have a successful MySQL User Group.” There’s more than one way to do it, tuberculosis I’m sure. There are 3 basic principles:

1) Try to do as little work as possible.

2) Make your colleagues do as little work as possible.

3) Always have a topic/presentation

These three principles will get you far, site and should be weighted equally. Do not use principle # 1 as an excuse to not follow principle #3. As well, “doing work” includes “paying money”. With that being said:

  1. Make your user group easy to get to. This has different meanings for different areas. It may mean near a major highway interchange, it may mean near a mass transit station. Whatever it means for you, make it easy.
  2. When the Boston MySQL User Group first started, we had free space in an office building right in the city of Boston.

    Pros Cons
    Free Not enough parking
    Close to the subway and train station No free parking
    The street was clearly labeled We had to have a person stand by the door to let people in
    The building was clearly labeled
    There was a great pub next door

    Then we moved to a space at MIT:

    Pros Cons
    Free Passers-by eat the pizza and drink the soda
    Close to the subway and train station We had to have good maps to find the location
    Plenty of free parking

    Now, you may not be so lucky to find a place that will give you space for free. Consider local universities. Also, local libraries (university or otherwise) usually have some meeting space where they might be able to host you. Our first space, an office space, was gotten through a contact at MySQL. Contact some companies who use MySQL and ask if they’ll lend you space — most tech companies have folks there at night anyway, and it’s free advertising for the company! There is a book company near you, or a Pearson VUE center. Remember: it does not hurt to ask. The worst people can say is “no”, and if it’s contributing toward education, a book company (Pearson Education, Apress, O’Reilly, etc) might sponsor it.

    Getting a free space is key, particularly if it has A/V equipment for you to use (if you want to have lectures).

    Granted, if you want to just have a freeform discussion, any pub or coffee shop or location will do.

    You may think about having it in your home. Consider issues of personal safety, domestic distractions (kids, pets, etc), parking and transit, and the fact that most people feel comfortable going to their first meeting on “neutral” ground. However, if the culture surrounding where you live encourages it, go for it!

    If you must pay for a location, get a company to sponsor it. Get their monetary and time commitment in writing if you can (ie, they will sponsor for a year).

  3. Make the meetings easy to remember. Have them on the same day of the month (ie, 2nd Monday). Do not make them conflict with something similar (ie, PHP group, linux group). Try to have it at the same place each time.
  4. Figure out what your group wants and give it to them.
  5. Do they want lectures on specific topics? Maybe go to a place with wireless access and a “troubleshooting” meeting every so often. Maybe they want a blog with news, or war stories. Maybe a lending library would work. Anyone that comes to your meeting is looking for something. Ask each new member what they’re looking for. If they say “to learn more” then go with lectures — make sure to accomodate all skill sets, and have advanced lectures as well as beginning lectures. If they want to get to know each other better, go to a pub and talk about MySQL while you down a pint. Or run a charity fundraiser and donate the proceeds to a not-for-profit like the Electronic Freedom Foundation. There’s plenty the group can do, including having contests, or even starting a business together if you’re plucky.

  6. Have incentives.
  7. But remember rule #2, so keep costs as low as possible. Ask companies to sponsor dinner or light refreshments. Don’t be shy; ask book companies for books, T-shirts and buttons to give away as prizes. Again, the worst they can say is “no”, and I’ve found book companies and MySQL AB to be VERY accomodating, as well as local businesses. Ask company techies to present. Ask MySQL to send someone out to present.

  8. Be available, and follow up when you say you will. Often times folks will have a question. Being able to respond in a timely manner is important. But if you speak out and make regular annoucements, and solicit feedback, folks will know you are accomodating.
  9. Do not do work others can do. When someone asks if you can forward a job listing, have them post it to your group members. Or, better yet, have them come to your meeting and make an announcement in the first 5 minutes. This includes advertising! Find your local MySQL Sales Rep and ask them to help promote your group. Promote it on any site you can think of — in a blog, on Craigslist, heck, make flyers and post it around town if you have to. Get the word out there!
  10. Have the right attitude. It’s not your meeting, it’s your group’s meeting. If they want different topics, ask someone to research and present. It’s OK if the research isn’t perfect or complete; many times your group will fill in with their experiences.
  11. It’s OK to be wrong. No, really. If you don’t know the answer to a question, look it up later on, and follow up. Or ask the group if anyone knows. Also, presentations take time to make, and if you feel compelled to get every single detail right, they’ll take a lot longer. Keep an offline copy of the manual so you can look up anything you need to.
  12. Ask others for help. Even if you think you can do it better or faster. Your group should be able to survive without you, so if you can’t make a meeting all is not lost. This includes asking others to do a presentation of any length — it can be a 10 minute “this is how we use MySQL and this is what our setup looks like” to an hour or more. It does not have to be intimidating. Ask folks to present workshops they’re presenting at conferences, or present notes from conferences they go to. People need to feel like part of the group if the group is to be successful.
  13. If you can’t get a presentation, download one. MySQL is excellent at providing past webinars. Download it to your computer, and have a free lecture from an expert, that you can pause and rewind if you need to. MySQL Webinars. The Boston MySQL User Group videorecords the presentations and puts them online — see the links under “Presentations” at http://www.sheeri.net

Note: The Boston MySQL User Group is successful, but we don’t quite do everything above. I’d love to have more socialization, and I think once summer comes I’ll think of something geeky and fun to do outdoors, with little cost. Or maybe just a bowling trip.
This falls under “I knew I could do this but I didn’t realize I could apply it this way!”

You can do

SELECT 1 from table1;

Which will return n rows, treatment each row having 1 field whose value is 1. n is the number of rows in table1.

SELECT "string" from table1 works similarly.

However, refractionist I never considered using

SELECT "string" as "debug statement" to debug code.

For instance,

mysql> SELECT "SELECT foo from bar where baz>0" as "debug";;
+---------------------------------+
| debug |
+---------------------------------+
| SELECT foo from bar where baz>0 |
+---------------------------------+
1 row in set (0.00 sec)

Neat trick! This is why I follow the MySQL Users general list, because every so often a gem like this comes up. Plus, I can’t resist helping folks out. And if I’m not accurate, someone else will step up.

Some more random thoughts, as I’m thinking about them and did not really want to make a separate post for them — at the MySQL Users Conference, the rank on PlanetMySQL.com came up, from “the conference postings will increase my rank” to “so-and-so cheats and makes lots of little posts.”

Now, I was just happy to make the list. Of course, now that I did post a lot at the conference, my rank went up from about #12 to about #7. As an experiment, I’m attempting to publish an average of one post a day for May and see what my ranking is at the end of May. So far, so good. And of course, as always, all of my posts will have content!

I think it would be neat to have a little line on planetmysql.com that shows where “1 post a day”, “1 post a week” and “1 post a month” fall for the top posters.
One of the things I did this weekend was knit the pattern I’d made for Sakila, link the dolphin in the MySQL logo. Click on the image for a bigger picture:

The only problem is I have no idea what to do with it. I have more of the orange and blue yarn. I thought I would make it into a purse but it turned out much wider than I expected. I could make it into a big handbag but I don’t think I’d use it. Any suggestions?

The pattern itself:


dolphin: (56 sts wide by 59 rows)
When I say "k to stitch marker and remove", sickness I mean knit to the stitch marker, and take the stitch marker off.

cast on 56 sts.
knit 2 rows

I had to tweak the pattern mid-knit, so I *think* this is the correct pattern. If the count looks OK for rows 40-56 then there's nothing to worry about. Please let me know if you try this. I used size 9 needles and Lily Sugar & Cream Yarn in orange and navy blue. As you can see in the picture above, it turns out to be over a foot wide.

1) k4, p5, k1, place stitch marker, k to end
2) p to stitch marker & remove, k7, p3
3) k2, p3, k1, p6, k2, place stitch marker, k to end
4) p to stitch marker & remove, k4, p6, k2, p2
5) k2, p3, k6, p7, k4, place stitch marker, k to end
6) p to stitch marker & remove, k10, p6, k3, p3
7) k4, p2, k12, p5, k2, place stitch marker, k to end
8) p to stitch marker & remove, k6, p12, k3, p4
9) k5, p3, k14, p4, k2, place stitch marker, k to end
10) p to stitch marker & remove, k4, p16, k2, p to end
11) k6, p3, k5, p2, k9, p4, k1, place stitch marker, k to end
12) p to stitch marker & remove, k3, p10, k3, p4, k3, p to end
13) k7, p3, k5, p2, k11, p3, k1, place stitch marker, k to end
14) p to stitch marker & remove, k3, p19, k2, p to end
15) k8, p2, k20, p4, k1, place stitch marker, k to end
16) p to stitch marker & remove, k4, p20, k3, p to end
17) k8, p3, k21, p3, k1, place stitch marker, k to end
18) p to stitch marker & remove,k4, p20, k2, p to end
19) k10, p2, k21, p3, k1, place stitch marker, k to end
20) p to stitch marker & remove,k3, p21, k2, p to end
21) k11, p3, k21, p2, k1, place stitch marker, k to end
22) p to stitch marker & remove, k3, p21, k2, p to end
23) k12, p2, k22, p2, k1, place stitch marker, k to end
24) p to stitch marker & remove, k3, p23, k1, p to end
25) k12, p1, k23, p3, k1, place stitch marker, k to end
26) p to stitch marker & remove,k3, p24, k2, p to end
27) k11, p2, k25, p2, place stitch marker, k to end
28) p to stitch marker & remove, k2, p25, k3, p to end
29) k10, p2, k26, p3, place stitch marker, k to end
30) p to stitch marker & remove, k2, p27, k2, p to end
31) k10, p2, k5, p2, k20, p3, place stitch marker, k to end
32) p to stitch marker & remove, k2, p20, k3, p4, k3, p to end
33) k11, p2, k3, p4, k20, p3, k1, place stitch marker, k to end
34) p to stitch marker & remove, k3, p20, k5, p3, k2, p to end
35) k11, p2, k3, p5, k20, p4, k3, place stitch marker, k to end
36) p to stitch marker & remove, k6, p20, k3, p1, k2, p3, k1, p to end
37) k12, (*p2, k2* 2 times), p2, k22, p5, k1, place stitch marker, k to end
38) p to stitch marker & remove, k4, p23, k2, p3, k6, p to end
39) k13, p4, k4, p2, k25, p3, k1, place stitch marker, k to end
40) p to stitch marker & remove, k3, p25, k2, p5, k3, p to end
41) k23, p1, k26, p3, k4
42) p3, k3, p26, k2, place stitch marker, p to end
43) k to stitch marker & remove, p2, k26, p4, k2
44) p2, k8, p21, k2, place stitch marker, k1, p to end
45) k to stitch marker & remove, p2, k18, p8, k5
46) p9, k4, p17, k2, place stitch marker, k1, p to end
47) k to stitch marker & remove, p2, k18, p3, k9
48) p8, k4, p17, k2, place stitch marker, k1, p to end
49) k to stitch marker & remove, p3, k17, p4, k7
50) p5, k5, p18, k2, place stitch marker, p to end
51) k to stitch marker & remove, p3, k18, p4, k5
52) p5, k3, p19, k2 place stitch marker, p to end
53) k to stitch marker & remove, p3, k19, p2, k5
54) p4, k2, p19, k3, place stitch marker, p to end
55) k to stitch marker & remove, p4, k19, p2, k3
k 2 rows

Edit: apparently as I was writing this, ed Dave put out the call for others to write their own. So, I *have* been asked….

I find Dave Rosenberg’s “How I Work” series fascinating, so I thought I would post how I work, and some tips I’ve picked up along the way.

I enjoyed How Brian Aker Works the best, mostly because some of the ideas were new and fresh to me — for example, polling e-mail every 30 minutes (and thinking about moving to once every hour).

Now, most people I know would say “But I MUST respond to e-mail, the faster the better!” To that I say, “What if you were in a meeting?” Most people will call if they want an immediate answer, and if you’re truly in a meeting, they’ll leave a voicemail message. I wouldn’t suggest polling your pager every 30 minutes, but for me, e-mail is a non-emergency medium and thus Brian’s technique is pure genius for not getting distracted by e-mail.

Not that anyone asked, but:

What is your role?
I am a MySQL Database for Online Buddies, Inc — a company committed to developing on-line communities that provide members with safe, friendly and exciting sites through which members can express themselves and interact with one another as they wish. (That’s straight from Marketing.)

What is your computer setup?
At work, a Dell desktop running Windows. It does not matter what OS I use as most of what I do involves logging into a database or server or researching/reading on the ‘net. I’m fond of saying “All I need is a web browser and a way to SSH and I’m happy.” At home I have a Windows laptop work gave me (also a Dell), although when I buy my own home computers they are Apple laptops.

What desktop software applications do you use daily?
Firefox. I find Safari (Mac OS X) bloated, taking too long to open. Internet Explorer is dead to me until they get tabbed browsing.

I also use Microsoft Outlook to deal with work e-mail, iTunes for music, and SecureCRT for SSH’ing. I’ll use Excel or Word for reporting and reading documents sent to me, but I only have to fire that up a few times a week.

I use Trillian for IM. I use EditPadLite for small text files I need to read on my desktop,

What websites do you visit every day?
gmail, planetmysql, http://gather.com, livejournal, http://everythingsysadmin.com/, and wunderground.com for the weather.

What mobile device or cell phone do you use?
I have a Motorola RAZR. I like the flip phone and the low weight, but some of the missing features (like being able to type more than one letter as an index to my phone book) really annoy me. I also have a Verizon PocketPC which I use during an emergency to login to our machines if I’m not near a computer.

Do you use IM?
Yes. For short technical requests or conversations, or “Have you done this yet?” I find it works well. Much like the phone, if I’m too busy to talk, I don’t respond. And much like the phone, people respect my need for few distractions and rarely use it. My colleagues walk into my office as much as they IM, and almost never call.

Do you use a VoIP phone?
Not yet, although one of my tasks this week is to start using Skype.

Do you have a personal organization theory?
Oh yes. I organize everything! I always need a to-do list, as I’m easily distracted. I keep it short — my to-do list is the tasks I expect to work on that day. I use the whiteboard in my office to keep track of weekly tasks and erase them when they are done — there are no more than a dozen at one time. There is always something new that comes up, so I’m never left with nothing on my list, and if I worry about something being forgotten I will put it into request tracking software. My high tendency toward distraction means I might put off certain tasks, but I do so by reading websites, journals, lists and researching. So I end up constantly learning and never needing to “find time” to read that technical magazine.

Physically I organize in piles. Mostly everything is in one to-do pile — ie, if I have a schema I’m modifying I’ll have it printed out with my notes. I’ll clean that out around once a week, and like the whiteboard, there’s never much in it. That’s not to say I’m busy, but if something is in there more than a few weeks, chances are it does not belong there.

I have always had some kind of organizer/planner. It’s something that needs to be small enough to take with me. I learned early on that paper is better than electronics for me, as I can drop my paper organizer all I want with no consequences. It does not sync to my desktop, but I also don’t have to worry about losing data. If I got along better with electronics I’d have a palm synched with LifeBalance. I love the software, but remembering to print out my schedule so I’d have a copy on me at all times did not work.

Anything else?
I cannot recommend Limoncelli’s Time Management for System Administrators (published by O’Reilly) enough if you are finding your current way of working not good enough, or even if you think it’s good enough and want to be sure.

I’d love to see other folks’ ways of working.
So, anorexia I try to answer questions on the mysql users list. It usually frustrates me, somnology but I also want to help. And often, I learn things.

My 2nd biggest pet peeve is that people don’t think to Google their findings. Or even “MySQL” their findings. If you have a short phrase or word, type the following into your address bar and MySQL does the right thing:

http://www.mysql.com/short word or phrase

try it:

http://www.mysql.com/replication
http://www.mysql.com/insert syntax
http://www.mysql.com/can’t%20connect

The bigger pet peeve I have is that people are AFRAID. They shake in their boots if there’s something they don’t understand. This is why there are such things as test servers. Most of the time you can run a query on a test server and see if it does the right thing.

We’re not creating bombs here. Sure, if you mess up a delete query you might mess up your system. But a SELECT query can always be “kill” ed. And a test server does not care if you delete data.

There’s no excuse for not having a test server. MySQL is available for many platforms. It’s plenty easy to mysqldump your schema, and your data too. Have lots of data? Use SELECT and LIMIT.

It’s quite frustrating as someone who helps people to get the attitude of “I don’t know what to do?!!?” So yes, when someone says “Would this work?” it makes me want to scream. Wouldn’t it be easier for you to try it, than to have me set up a test scenario for you?

Now of course, this is different from the “This should work and does not, why?” and that’s OK.
Please share good ideas implemented poorly you have seen.

For example, sale in the past 24 hours I have come across 2 such beasts:

1) A company doing vertical scaling based on username. Unsurprisingly, decease they found that 70% of their users had usernames beginning with 1 of 2 letters. A better idea? Do it by last 2 digits of a user id. That way, even though users are created and perhaps deleted all the time, the distribution is effectively random. Language is not.

With 2 significant figures, you can divide vertically many different ways — 1 large table of all the uids, 2 tables of uids ending in 00-49 and 50-99, 4 tables, 10 tables, 25 tables, 50 tables, 100 tables. This eliminates the need for a separate table for each user.

For example, the online dating site I work for uses this method for messaging. So a user’s inbox is just one part of a table. If the user has uid 12345, their “Inbox” is the result of SELECT * FROM Inbox_45 WHERE toUid=12345. Their “Sent” box is the result of SELECT * FROM Inbox_45 WHERE fromUid=12345. We have over 650,000 active users; I can only imagine what horrors we would have if we had 1 table for each person’s mailbox (much less 1 each for Trash, Sent, Saved and Inbox).

This also helps when using InnoDB tables, as we are — the count(*) query to find the number of messages in your boxes uses the indexes on toUid and fromUid on the tables. 1 table per uid would not take advantage of this index, although it would probably be a bit faster in terms of retrieval. We kept this idea in mind — if we had one table per uid, we probably could use MyISAM tables, and counts would be faster. But again, horrors with 650,000 tables!

Also, you want to keep your code as flexible as possible. Do not hard code which servers have which tables — use SHOW TABLES in scripts and such. We truncate trashes nightly, and simply have a loop that says:


(pseudocode)
for i in "show tables"
do
truncate Trash_$i
done

2) The lead developer on a new project had the rule of “each table has a class”, which led another developer to come to me asking to resolve a problem. You guessed it — tables in different databases that have the same name. We have a static database, with a table called “Preferences”. This is a joining table, that says “preference #1 is always blah”. And in our profiles database for a site, we also have a “Preferences” table — this is where we associate users with their preferences.

The goal is world domination to be able to have multiple sites use similar codebases and data schema. Therefore, it is perfectly reasonable to have databases with identical schemas and different names. Site1 can have an identical schema and codebase to Site2, with storing the data in the “Site1” and “Site2” databases. The reason to have 2 separate databases is that we want to be avoid having to put which site the data refers to as a part of each row.

Any other examples of good ideas implemented poorly? Feel free to make an entry, but if it’s not on PlanetMySQL.org please put a link in the comments so I’m sure to actually read it.

Followers may note I fell way short of my goal of 1 post per day in May; in fact, I had 15 posts in May, not the 31 I had hoped. I’m OK with that, and I apologize for the long radio silence. In the meantime, I had a wonderful few weeks, including biking on the island of Martha’s Vineyard, and a wonderful phone conversation with Frank Mash last night.

If anyone cares to know, my Skype name is awfief. I’m happy to talk to folks; I’m GMT -5 (Eastern Standard Time, Daylight Savings when appropriate). I also have a tendency to leave the program on while I’m in the room, so feel free to ring (instead of Skype Chat) to see if I’m around.
Guiseppe Maxia recently posted on Filling Test Tables Quickly. However, viagra dosage buy information pills he only gave examples for numbers, find words and dates. This article will deal with randomly inserting images into a database — particularly useful for testing images stored in the database versus the filesystem. This article was inspired by Guiseppe’s article.

[note: there will be a post soon with my presentation on storing images in the MySQL filesystem, and there will be ample opportunity for discussion then, especially since everyone making a claim will have tested their system, given this code.]

Getting images into the database is not easy. All the tutorials I have read have used a programming language to get images into a database. Using cat and similar unix tools, I have attempted to be able to insert an image into a database using only the mysql client commandline tool. That failed — I would love to know if anyone has any tips on inserting an image into a database without using a programming language.

So, I compromised. I put 20 images into a table as a baseline, and then wrote a stored procedure to suit my needs. Basically, users can have up to 6 images, so I wanted to replicate that possibility in the test db.

This stored procedure takes in 3 integers: maximum # of images per uid, range of random images from the “originals” table, and # of uids to use when populating the table. You will also need a table called “originals” containing the original images. A sample table, with 20 images, can be downloaded from:
http://www.sheeri.net/public/originalimages.sql.gz.

These images were taken from:
http://www.takigen.co.jp/japanese/images/number without explicit permission. I have no idea what Takigen is as I do not read Japanese. I ran a Google Image Search for tiny pictures involving numbers, and found that website that way.

To import it, run at the shell prompt:

> gunzip originalimages.sql.gz
> mysql dbname < originalimages.sql

(explanation below the code)


delimiter $$

drop procedure if exists populate_images $$
create procedure populate_images(max_images INT,num_originals INT,finalcount INT)
not deterministic
modifies sql data
begin
declare uid int default 0;
declare num_images int default 0;
declare image_num int default 0;
declare image_counter int default 0;
set max_images:=max_images+1;
set num_originals:=num_originals+1;
while uid < = finalcount do set image_counter:=0; set num_images:=FLOOR(RAND() * max_images); while image_counter < num_images do set image_num:=FLOOR(RAND() * num_originals); INSERT INTO images (uid,image,uploaded) SELECT uid,image,NOW() from originals where imageNum=image_num; set image_counter:=image_counter+1; end while; set uid:=uid+1; end while; end $$

delimiter ;


Explanation:
declare uid int default 0;
Initialize the counter for the current uid.

declare num_images int default 0;
Initialize the variable for the number of images per user; selected by random with a maximum as given in the 1st argument to the procedure.

declare image_num int default 0;
Initialze the variable that will hold which image to retrieve from the originals table. Selected by random for each image.

declare image_counter int default 0;
Initialize the counter for the image number; reset to 0 for each uid.

set max_images:=max_images+1;
set num_originals:=num_originals+1;

Variables are increased by 1 because I used < in the code instead of <= . I guess one could change the code to reflect this. while uid < = finalcount do
loop through the appropriate # of uids…

set image_counter:=0;
set num_images:=FLOOR(RAND() * max_images);

reset the image counter and get a new # of images for this particular uid, between 0 and max_images. If you want to specify between 1 and max_images, change to 1+FLOOR(RAND() * max_images)

while image_counter < num_images do set image_num:=FLOOR(RAND() * num_originals);
Get a random number between 1 and num_originals (ie, how many images there are to choose from).

INSERT INTO images (uid,image,uploaded) SELECT uid,image,NOW() from originals where imageNum=image_num;
Insert the random image and the uid and time uploaded into the images table.

set image_counter:=image_counter+1;
end while;

increment the image counter — you are finished with this image for this uid

set uid:=uid+1;
end while;
Increment the uid counter -- you are finished with this uid

end $$
Procedure end


Giuseppe’s article talked about randomly filling things quickly. This isn’t as lightning fast as other methods. To wit:

5 uids produced 20 image entries and took 1.14 seconds. (using call populate_images(6,20,5);)
50 uids produced 126 image entries and took 7.37 seconds.
500 uids produced 1416 image entries and took 1 min 26.48 seconds.
5,000 uids produced 14049 image entries and took 14 min 40.68 seconds.
(it scales linearly per image entry, not suprisingly).
So 50,000 uids would take about 2.5 hours, and 500,000 entries would take about a day to randomly fill.

Alternatively, using this procedure to randomly fill 5 uids and then repeating
insert into images (image,uid,uploaded) select image,uid,NOW() from images;

Takes:
5 uids, 1.33 seconds
50 uids, 1.60 seconds
500 uids, 2.03 seconds
5000 uids, 3.08 seconds
50000 uids, 30.45 seconds
500000 uids, 8 min, 47.10 seconds

But that’s only got 5 really random ones, copied a bunch of times. It may not be random enough. How about 1,000 random ones, and then copy them (I didn’t change uids, although I should have, I just didn’t feel like coding it):

call populate_images(6,20,1000);
insert into images (image,uid,uploaded) select image,uid,NOW() from images;

(repeating that last line)

Takes:
1000 uids, 2 min 53.66 seconds
5000 uids, 2 min 54.24 seconds
50000 uids, 3 min 31.91 seconds
500000 uids, 20 min 45.08 seconds

Comments and suggestions welcome.

Guiseppe Maxia recently posted on Filling Test Tables Quickly. However, viagra dosage buy information pills he only gave examples for numbers, find words and dates. This article will deal with randomly inserting images into a database — particularly useful for testing images stored in the database versus the filesystem. This article was inspired by Guiseppe’s article.

[note: there will be a post soon with my presentation on storing images in the MySQL filesystem, and there will be ample opportunity for discussion then, especially since everyone making a claim will have tested their system, given this code.]

Getting images into the database is not easy. All the tutorials I have read have used a programming language to get images into a database. Using cat and similar unix tools, I have attempted to be able to insert an image into a database using only the mysql client commandline tool. That failed — I would love to know if anyone has any tips on inserting an image into a database without using a programming language.

So, I compromised. I put 20 images into a table as a baseline, and then wrote a stored procedure to suit my needs. Basically, users can have up to 6 images, so I wanted to replicate that possibility in the test db.

This stored procedure takes in 3 integers: maximum # of images per uid, range of random images from the “originals” table, and # of uids to use when populating the table. You will also need a table called “originals” containing the original images. A sample table, with 20 images, can be downloaded from:
http://www.sheeri.net/public/originalimages.sql.gz.

These images were taken from:
http://www.takigen.co.jp/japanese/images/number without explicit permission. I have no idea what Takigen is as I do not read Japanese. I ran a Google Image Search for tiny pictures involving numbers, and found that website that way.

To import it, run at the shell prompt:

> gunzip originalimages.sql.gz
> mysql dbname < originalimages.sql

(explanation below the code)


delimiter $$

drop procedure if exists populate_images $$
create procedure populate_images(max_images INT,num_originals INT,finalcount INT)
not deterministic
modifies sql data
begin
declare uid int default 0;
declare num_images int default 0;
declare image_num int default 0;
declare image_counter int default 0;
set max_images:=max_images+1;
set num_originals:=num_originals+1;
while uid < = finalcount do set image_counter:=0; set num_images:=FLOOR(RAND() * max_images); while image_counter < num_images do set image_num:=FLOOR(RAND() * num_originals); INSERT INTO images (uid,image,uploaded) SELECT uid,image,NOW() from originals where imageNum=image_num; set image_counter:=image_counter+1; end while; set uid:=uid+1; end while; end $$

delimiter ;


Explanation:
declare uid int default 0;
Initialize the counter for the current uid.

declare num_images int default 0;
Initialize the variable for the number of images per user; selected by random with a maximum as given in the 1st argument to the procedure.

declare image_num int default 0;
Initialze the variable that will hold which image to retrieve from the originals table. Selected by random for each image.

declare image_counter int default 0;
Initialize the counter for the image number; reset to 0 for each uid.

set max_images:=max_images+1;
set num_originals:=num_originals+1;

Variables are increased by 1 because I used < in the code instead of <= . I guess one could change the code to reflect this. while uid < = finalcount do
loop through the appropriate # of uids…

set image_counter:=0;
set num_images:=FLOOR(RAND() * max_images);

reset the image counter and get a new # of images for this particular uid, between 0 and max_images. If you want to specify between 1 and max_images, change to 1+FLOOR(RAND() * max_images)

while image_counter < num_images do set image_num:=FLOOR(RAND() * num_originals);
Get a random number between 1 and num_originals (ie, how many images there are to choose from).

INSERT INTO images (uid,image,uploaded) SELECT uid,image,NOW() from originals where imageNum=image_num;
Insert the random image and the uid and time uploaded into the images table.

set image_counter:=image_counter+1;
end while;

increment the image counter — you are finished with this image for this uid

set uid:=uid+1;
end while;
Increment the uid counter -- you are finished with this uid

end $$
Procedure end


Giuseppe’s article talked about randomly filling things quickly. This isn’t as lightning fast as other methods. To wit:

5 uids produced 20 image entries and took 1.14 seconds. (using call populate_images(6,20,5);)
50 uids produced 126 image entries and took 7.37 seconds.
500 uids produced 1416 image entries and took 1 min 26.48 seconds.
5,000 uids produced 14049 image entries and took 14 min 40.68 seconds.
(it scales linearly per image entry, not suprisingly).
So 50,000 uids would take about 2.5 hours, and 500,000 entries would take about a day to randomly fill.

Alternatively, using this procedure to randomly fill 5 uids and then repeating
insert into images (image,uid,uploaded) select image,uid,NOW() from images;

Takes:
5 uids, 1.33 seconds
50 uids, 1.60 seconds
500 uids, 2.03 seconds
5000 uids, 3.08 seconds
50000 uids, 30.45 seconds
500000 uids, 8 min, 47.10 seconds

But that’s only got 5 really random ones, copied a bunch of times. It may not be random enough. How about 1,000 random ones, and then copy them (I didn’t change uids, although I should have, I just didn’t feel like coding it):

call populate_images(6,20,1000);
insert into images (image,uid,uploaded) select image,uid,NOW() from images;

(repeating that last line)

Takes:
1000 uids, 2 min 53.66 seconds
5000 uids, 2 min 54.24 seconds
50000 uids, 3 min 31.91 seconds
500000 uids, 20 min 45.08 seconds

Comments and suggestions welcome.


5.0 Certification Validation
certificate id: 74651
password: sheeri



Oracle ACE Director for MySQL, hair March 2010


Merv Adrian of Gartner says:
“sheeri is a seriously high-bandwidth presenter. Good, case well organized content.”

Henrik Ingo of OpenLife.cc says:
“The energy this lady has to educate people on using MySQL is simply amazing.”

Oracle/Sun/MySQL AB employees have said:
“Sheeri always amazes me. When I think that I have seen all it has to be seen in the field of databases, she will always come with some innovative way of looking at old things
….
She’s a captivating speaker. Once you attend one of her sessions (or if you just talk to her in a corridor about anything), you are addicted. Highly recommended!”
Giuseppe Maxia, http://tinyurl.com/2xm2o5

“Beware the SHE-BA, she’s got great blog entries, a superb podcast, and does so much cool things”
Colin Charles, http://tinyurl.com/2cw543

“Recognising achievement in the arena of communicating, connecting individuals, arranging meetings, and being a vocal advocate of MySQL community interests, [Sheeri] deserves the longest title of all MySQL Community Award Winners of 2007. [She] has made great contributions through MySQL Camp, through blogs, and to be able to respond instantaneously with plenty of insight.”
http://www.planetmysql.org/kaj/?p=107

Clients have said:
“Your [technical] review has been really thorough, and you’ve gone above and beyond and done some things to make my job a lot easier!” — Brian Jepson, Editor, O’Reilly Media, Inc.

“Sheeri provided excellent support on an effort that needed very quick turn around. Sheeri was able to assist in very tangible ways in helping us to determine the database architecture all while workinging a an environment that was almost entirely new.” — David Khan Manager, DBA & Data/Information Architects, CBS http://www.pythian.com/news/testimonials/single.php?testimonial=81

Other colleagues have said:
“Sheeri is a goddess. She is everything you want and a friend or coworker. She enjoys being helpful and she is an extraordinarily skilled DBA. But it’s more than that. Sheeri is wise, smart, and dedicated enough that regardless of the problem being worked on, she finds the right solution and makes great things happen.” Julian Cash, Founder, The Human Creativity Project, via LinkedIn — must login to linkedin.com to view the original.

“The critical reviewing provided by Sheeri Kritzer (http://sheeri.com) has proved to be exceptionally useful, and she has had a significant impact on many of the hacks published here.”
from SQL Hacks, by Andrew Cumming and Gordon Russell, published by O’Reilly (Nov. 2007), Acknowledgements (p. xii)

“Sheeri is not only a DBA, she’s a major contributor to the MySQL community, a regular poster to PlanetMySQL, and a major force at MySQL conferences. She also has a widely read blog and a widely listened podcast.

At Online Buddies, she is basically the reason why it works at all.”
Mark Atwood, author of the Amazon S3 storage engine for MySQL and MySQL AgentX SNMP subagent, 2007 Sysadmin of the Year Contest

Co-workers have said:

“Sheeri is the only person I know who can literally be running 5 or 6 scripts at the same time, having two conversations and still be able to get it all done correctly and on time. I’m always shocked by how fast she gets things done and the wealth of knowledge she has. Not to mention she is always friendly and helpful, even if you have to call her at 3:00 am. Simply put, Sheeri friggin’ rocks..” Travis Roe, Customer Service Shift Supervisor, Online Buddies, Inc. in the 2007 Sysadmin of the Year Contest

“Sheeri Krizer is a MySQL rockstar. She is one of the top contributors to the MySQL community and is well known among her peers. A founder of many user groups, Sheeri is one of the goto people for tips, tricks, and information on just about anything MySQL or database related. Just this year she was recognized as a significant leader at the annual MySQL conference in California. How well known is she? Heck, we called MySQL to purchase a few support licenses and its amazing the response we got when we dropped her name. All of a sudden the price per license dropped and immediate payment turned into, “pay us anytime.”

In the office she is the go to data person maintaining god knows how many DB tables and gigs and gigs of data. The Master (or Mistress) of all things MySQL and Linux, there is no shell she can’t manipulate to do her bidding. With a few strokes of the keyboard she can kick up queries, triggers, and CRON jobs almost by reflex. Beyond her tech skills she actually has a personality. No really, she’s very personable with a great sense of humor. Sheeri makes the office “funner” with her various witty quips during meetings, standups, or other informal gathering.

There is no OS she can’t tame. Off the top of my head she works directly with Windows XP, Windows Server 2003, Windows Mobile 5, Apple OSX 10.4, Red Hat Enterprise 4, Red Hat Enterprise 5, CentOS 4, Trustix, Fedora, etc. Truly a versatile person in all that she does.

Another reason she should be the winner of Sysadmin of the Year? Well, so she can stop bogarting the Guitar Hero guitar. ” Winston Chou, Systems Engineer, Online Buddies, Inc. in the 2007 Sysadmin of the Year Contest

“Sheeri’s collaborative approach to systems’ design and administration ensured that relevant details came forth in the planning rather than testing or production stage of a project. Her care to get a job done well and prompt handling of issues enabled the team I led to be more productive than we had been under any other system administrator at Tufts.” http://tinyurl.com/q7fzv — must login to linkedin.com to view the original.

Managers have said:
“Sheeri was the rare student who understood the responsibilities of supporting a large number of users who sometimes appeared unreasonable. Not only did she have the technical skills to keep things running well, but she also managed to calm far more than her share of upset users.”
David K. Wittenberg, System and Network Manager, Computer Science IT Department, Brandeis University

Other sites have said:
“Sheeri Kritzer is a certified MySQL administrator with an active interest and involvement in MySQL and the MySQL community. In her blog she discusses database security and performance in a practical and competent manner, while also covering events she is participating in as well as more general issues of interest to users and developers of MySQL. The blog seems to be updated regularly, and it contains many entries – all of which are well written and more extensive than one perhaps have come to expect from blogs today.” — Bill, the founder of PHPCentral.org at http://www.phpcentral.com/49-notable-mysql-blogs-reviews.html

Boston MySQL Meetup Group members have said the following about Sheeri’s presentations:

June 2006 Meetup
“Very KISS (keep it simple stupid). Presentation seemed accessible to people of different levels of technical knowledge; Jargon was kept to a minimum.”

March 2006 Meetup
“very interesting and informative”

January 2006 Meetup
“I found the meeting informative with many tips on backup techniques. Thank you for sharing your experience and for the pizza!”

“Very focused and informative presentation.”

“I thought it went rather well, I like the structure.”