Sunday, February 28, 2010

The Final FAQ

As noted in my previous post the new SQLA question-and-answer website devoted to SQL Anywhere is ready for prime time. It's still in beta, yes, but it's ready for more people to use it.

The first step in that direction is now complete: The SQLA FAQ has been updated to reflect everything that's been learned over the first three month's of SQLA's existence.

Here's the Table Of Contents for SQLA's "Final FAQ":

What kind of questions can I ask here?
Do I have to log in to SQLA, or create an account?
Can I ask a stupid question?
Can I post sample code?
What if my English isn't very good?
How do I pick tags?
What is a "prefix"?
Why can’t I ask "subjective questions"?
What if I have more than one question?
What can I put in an answer?
Is it OK to answer my own question?
How should I behave?
How do I carry on a nested/threaded conversation?
Is it OK for vendors to post questions?
Can I talk about the beta?
Can I ask about PowerBuilder?
How come other people can edit my stuff?
How does moderation work?
What are reputation points?
What is a bounty?
How do I get back to the list of "Recent Questions"?
How do I edit a comment?
How do I post images and other files?
Is this site just like StackOverflow, except for being dedicated to SQL Anywhere?
Is SQLA owned by Sybase?
Who pays for SQLA?
When will SQLA go live?
Where is SQLA data stored? Is there a backup?
Why is it called "SQLA" instead of "SQLAnywhere"?
What are the Terms and Conditions for posting on SQLA?
What can I do if I don't like the way SQLA is being run?
What if I get a wrong answer?

Thursday, February 25, 2010

SQLA Has Backup!

SQLA is the new community question-and-answer website devoted to SQL Anywhere that started Beta testing back on November 8, 2009.

SQLA is still in Beta, but it IS ready for more traffic now that The Really Big Obstacle has been overcome: We have backup!

(if anyone wants a copy of the XML dump of all SQLA content, just email me at breck.carter at gmail.com)

So... SQLA is ready for prime time!


Time to invite more people to participate.

But first... it's time for the administrator (that's me) to update the SQLA FAQ to reflect all the wonderful results from the past few weeks of experimentation with SQLA... the StackExchange software REALLY IS SO MUCH BETTER than the best NNTP client-server setup, the best bulletin board software, the best "threaded forum" websites.

Updating the FAQ will take a bit of time, mainly because SQLA is not StackOverflow... SQLA works by a completely different set of rules than StackOverflow.com... mostly FEWER rules, FEWER restrictions, MORE freedom to use the site effectively.

Hard to explain... that's another "to do" item for me, come up with a sales pitch.

In the meantime, if you want to know more about the people behind the StackExchange software that runs SQLA, where it came from, where it's going, this recent podcast from Joel Spolsky answers questions submitted by administrators who operate websites just like SQLA. And there's hundreds of them.

Who doesn't have an hour to listen to Joel Spolsky? Well, maybe you don't, so here are SOME of the high points (there's lots more, including stuff I did not know like the StackExchange software is a separate fork of StackOverflow, and it's StackOverflow going the venture capital route, not StackExchange):


Joel sits down with the Stack Exchange team, who are working on the hosted version of Stack Overflow at the Fog Creek offices in New York City.
  • Meet the Stack Exchange team -- David Fullerton, Aaron Maenpaa, and Emmett Nicholas.

  • For Stack Exchange sites that have a smaller community, Stack Exchanges may email users more aggressively, to invite users to answer less trafficked SE questions. Joel proposes that weekly roll-up emails might work well on smaller Stack Exchange sites.

  • Stack Exchange is a hosted service; it's currently running on 2.5 servers and soon a third.

  • Stack Exchange has an export feature, so all the data in your site can be dumped out to a file, similar to the way the monthly Stack Overflow cc-wiki data dumps work.

  • Joel blogged about Stack Overflow looking for venture capital -- that should not affect Stack Exchange. In any case, even if it did, you can use your own domain name which you take with you, and as mentioned above, you can export all your data. There should be competition, and smart competitors will support the Stack Overflow and Stack Exchange export formats.

  • Stack Exchange pricing is already at maximum, primarily to reduce demand to a level that the current SE team can support. It can only go down over time! It is definitely our goal to make it easier over time for everyone who wants a Stack Exchange site to have one. We're exploring a lot of possibilities including ad subsidized; it's also possible that larger corporate adoption of Stack Exchange may subsidize the smaller community sites as well.

  • Right now every Stack Exchange site has its own IIS website (even though they all share the same app pool), but that turns out to be not a great performance model for lots of small sites. 

  • One of the Catch-22s of a Stack Exchange site is that fundamental actions like voting up and creating tags require reputation, but nobody has any reputation on a new site. The Stack Exchange team added a "bootstrap mode" which relaxes a lot of these requirements so you can get your site up and running.

  • David notes that a smooth admin / owner setup process is essential to the Stack Exchange service model. You also can't have a ghost town -- you need some questions bootstrapped into the system before you even show it to the broader public. This is analogous to the private invitation-only betas we did for Stack Overflow, Super User, and Server Fault.

  • If you'd like to provide additional feedback to the Stack Exchange team, we encourage you to visit Meta Stack Exchange and help us dogfood our own system.

Thursday, February 18, 2010

Sybase Developer Days Worldwide Seminar Tour 2010

Save the Date...

Join Sybase's technical experts who will showcase the latest releases of our industry leading development software. All seminars are free and run from 8.30am - 2pm local time (timing may vary slightly by location) with breakfast and lunch included. Each Seminar features a keynote presentation followed by your choice of tracks:

  • Advantage Database Server 10

  • PowerBuilder 12

  • SQL Anywhere Innsbruck

  • Sybase Unwired Platform 1.5

Europe

  • Monday, April 19, 2010, Milan, Italy

  • Tuesday, April 20, 2010, Wiesbaden, Germany

  • Wednesday, April 21, 2010, Amsterdam, Netherlands

  • Thursday, April 22, 2010, London, UK

  • Friday, April 23, 2010, Madrid, Spain

  • Tuesday, April 27, 2010, Stockholm, Sweden

  • Wednesday, April 28, 2010, Paris, France

North America

  • Monday, May 3, 2010, Boston, USA

  • Tuesday, May 4, 2010, New York, USA

  • Thursday, May 6, 2010, Houston, USA

  • Tuesday, May 11, 2010, Los Angeles, USA

  • Wednesday, May 12, 2010, San Francisco, USA

Monday, February 1, 2010

Try rebooting

Caution: This is another fluff-piece just like "When did Google become perfect?"... it's not in the same league as deep-thought articles like, for example, those by Glenn Paulley and others... heck, it's not even in the same sport.

But sometimes shallow thinking is called for... like when you're faced with some bizarre computer problem that just won't go away when you wave a dead chicken over the keyboard. That's when "try rebooting" comes in to play.

I remember the first time I had reboot power over a computer... it was the mid-1980s, the computer was an IBM 3270 video controller, and the boss said "try turning it off and on" when all the dumb terminals in the office stopped working properly.

Prior to that, turning off "the computer" was a firing offense... there was a big red OFF button on the wall in the mainframe room, and if you pressed that button you had better be on fire... yourself... with no hope of personal survival.

Then came PCs, and rebooting became a regular ritual performed many times a day... folks didn't think anything of it. "Keep your config.sys and autoexec.bat small" was standard advice so rebooting would be fast. The application development life cycle was described as "edit, compile, test, reboot."

And then, fast forward to 2010, computers are much more reliable, you don't have to reboot every time you change a network setting or perform some other minor task, and once again folks are used to long periods of up-time.

Here's another piece of wisdom: "Don't forget what you already know." What you know is that rebooting is a powerful problem resolution technique, and if you don't have a clue about what's wrong then "try rebooting" should be one of the first things you consider.

Example: Norton Ghost crashes intermittently when doing a high-speed backup across TCP/IP to another computer, or via USB to an external disk drive: "Error EBAB03F1: Insufficient system resources exist to complete the requested service".

Solution: After such a crash try rebooting. Norton Ghost will now work... so far, 100% of the time. It took me months to realize "try rebooting" was the solution, and for more months "try rebooting" has proven to be the only reliable solution. Don't ask me about the CAT6 upgrade, the new router, the endless "system tuning" efforts... wasted time, wasted money.
Here's another example: If you install software using an InstallShield setup.exe, and something doesn't work right afterwards, try rebooting. This applies to SQL Anywhere. It even applies to a SQL Anywhere EBF. Something might have been "in use" when the setup ran and Windows is waiting for a reboot to finish overwriting the old thing with the new thing.

Yes, it's magic. So is waving a dead chicken over the keyboard. So is "try rebooting"... except it doesn't just make you feel better, it sometimes actually works.

Wednesday, January 27, 2010

OMIGOSH! Proxy tables are FAST!

Normally, everything about a SQL Anywhere Beta is Super Secret Stuff but Sybase has given me explicit permission to publish this article.

There are strings attached:
  • I have to tell you where to go (to get the Beta ...why, what did you think I meant? :)

  • I have to tell you that I received explicit permission from Sybase to publish this.

  • I have to tell you the Beta is Super Secret Stuff... that the Beta agreement does not normally allow articles like this.
There, all done, twice.
OK, got that? Here's the story: I've been working for oh-too-long on an article entitled "Downloading Data into a SQL Anywhere In-Memory Database from Microsoft SQL Server", and that article discusses several techniques using SQL Server 2008 and SQL Anywhere 11.0.1. Two of those techniques are BCP and LOAD TABLE (always the fastest) and proxy tables (always the slowest).

Folks who know about BCP will claim nothing on earth can unload data from a SQL Server database faster than that, and folks who know about SQL Anywhere will say the same thing about loading data via LOAD TABLE.

And lots of people will tell that proxy tables, well, suck when it comes to performance.

All of that is is certainly true for SQL Anywhere 11.0.1: the BCP and LOAD TABLE test for the article took 720 seconds for 1.9 million rows whereas INSERT ... SELECT * FROM a proxy table took 4230 seconds... think "rocket fast" versus "continental drift".

But that's all changing with SQL Anywhere Innsbruck! The INSERT ... SELECT * FROM a proxy table only took 687 seconds! Proxy tables went from last to first place in the performance tests!

Here's my guess what's happened: First, the iAnywhere engineers have made some performance improvements to proxy tables, that I've been told is true.

Second, and this is guesswork on my part, the proxy table path runs directly from one database to another, it doesn't involve writing to or reading from an external disk file like BCP and LOAD TABLE. So, that bit of extra file I/O overhead is always gonna be an anchor 'round the neck of BCP and LOAD TABLE.

FYI, here is my very first post on the SQL Anywhere Beta forum (the "over a minute" claim was wrong, the proxy table test was only 33 seconds faster than BCP and LOAD TABLE):


Subject: OMIGOSH! Proxy tables are FAST!

Here's the full text of my forthcoming article "Top 1 New Features Of
SQL Anywhere Innsbruck"... seriously... I *live* for proxy tables...

CREATE SERVER mss
CLASS 'MSSODBC'
USING 'DSN=main_BRECK-PC';

CREATE EXTERNLOGIN DBA
TO mss
REMOTE LOGIN "sa"
IDENTIFIED BY 'j68Fje9#fyu489';

CREATE EXISTING TABLE proxy_mss_source
AT 'mss.main.dbo.mss_source';

INSERT sa_target
SELECT *
FROM proxy_mss_source;

-- 11.0.1...
1925469 row(s) inserted
Execution time: 4229.875 seconds

-- Innsbruck...
1925469 row(s) inserted
Execution time: 686.859 seconds

...ok, I'm REALLY serious, that just beat the combination of MSS 2008
BCP and 11.0.1 LOAD TABLE for transferring data straight across, by
over a minute, and hey, NOTHING beats BCP and LOAD TABLE... nothing!

Woohoo!

Breck Is Tilting On His Axis

Friday, January 15, 2010

When did Google become perfect?

This problem had been bugging me for years: I couldn't figure out how to use wonderfully-modern Wordpad instead of awkwardly-ancient Notepad to edit *.bat files.

So this morning I just bit the bullet, typed my question into Google...

how do I change the default editor for batch files
Check it out, see how stupid I feel now, not at the answer, but that sometimes when I have a question
Google is not the first thing I try.
That's just dumb.

How long has this interweb been going on?

Wednesday, January 13, 2010

Ranking SQLA

The SQLA question & answer website for SQL Anywhere ranks well down in the list of StackExchange beta sites:

  • 45th in number of questions

  • 45th in number of answers

  • 53rd in number of registered users

  • 47th in number of answers per question
But... SQLA isn't anywhere near the bottom, there are 154 sites in the list.

Some thoughts:
  • Some of those 154 sites are dead... ok, lots of them are dead, but the StackExchange beta software is sure getting a good workout.

  • SQLA hasn't been actively promoted yet. That's partly because everything's still in beta but mostly because there's no end-user backup yet (where "end user" means "site administrator", which is me).

  • The fact that SQLA has essentially the same rank in all 4 categories above means something... not sure what... maybe someone at mathoverflow can answer that.

  • Speaking of mathoverflow, that's where to go for Ego Therapy. If you think you're really smart try answering some of their questions.

  • If your head doesn't explode first, you will come away with shoulders slumped and a humbler view of your place in the universe.

  • Unless you really are smart. In which case please don't stare at me :)

  • Some of the other sites are pretty interesting and a lot less intimidating.
Here's the full list at the end of 2009...

Monday, January 11, 2010

Crosstab, Rotate, Pivot

Shameless promotion, that's what the title is all about: Include all the keywords anyone might use when asking this question:

Question: How do I rotate a table so that different row values in a single column become different columns in a new table?

Answer: I could have sworn I talked about this years ago, but apparently not... at least not anywhere people can find it.

Is that a subtle dig at the NNTP newsgroups? Yes, I'm sorry, it is... I'll try to be less subtle: NNTP sucks, the days of the newsgroups are numbered, and the future for SQL Anywhere questions and answers lies with SQLA! <g>
SQL Anywhere doesn't have the ability to rotate (crosstab, pivot, whatever) a table, and that feature isn't coming any time soon. What it does have is EXECUTE IMMEDIATE, plus the ability to code IF expressions just about anywhere in the SELECT statement. You can combine those two features to kludge a solution.
Is "kludge" too strong a word? Maybe so, since performance is pretty good. Good enough for this technique to be used in real time by the Foxhound database monitor when analyzing data gathered from thousands of database connections. But, no question... the code's funky.
It's actually hard to explain what rotating a table is all about, it's not exactly as simple as turning rows into columns and vice versa... it's easier to use an example.

Here's a table showing sales by state and quarter:

-- Part 1: Initialize data.

BEGIN
DROP TABLE t1;
EXCEPTION WHEN OTHERS THEN
END;

CREATE TABLE t1 (
c1 VARCHAR ( 10 ) NOT NULL,
c2 VARCHAR ( 10 ) NOT NULL,
c3 INTEGER NOT NULL,
PRIMARY KEY ( c1, c2 ) );

INSERT t1 VALUES ( 'CA', 'Q1', 1000 );
INSERT t1 VALUES ( 'CA', 'Q2', 2000 );
INSERT t1 VALUES ( 'CA', 'Q3', 9000 );
INSERT t1 VALUES ( 'CA', 'Q4', 7000 );

INSERT t1 VALUES ( 'NY', 'Q1', 4000 );
INSERT t1 VALUES ( 'NY', 'Q2', 5000 );
INSERT t1 VALUES ( 'NY', 'Q3', 1000 );
INSERT t1 VALUES ( 'NY', 'Q4', 6000 );

INSERT t1 VALUES ( 'FL', 'Q1', 9000 );
INSERT t1 VALUES ( 'FL', 'Q2', 7000 );
INSERT t1 VALUES ( 'FL', 'Q3', 2000 );
INSERT t1 VALUES ( 'FL', 'Q4', 1000 );

INSERT t1 VALUES ( 'AZ', 'Q1', 5000 );
INSERT t1 VALUES ( 'AZ', 'Q2', 5000 );
INSERT t1 VALUES ( 'AZ', 'Q3', 1000 );
INSERT t1 VALUES ( 'AZ', 'Q4', 3000 );

INSERT t1 VALUES ( 'MA', 'Q1', 2000 );
INSERT t1 VALUES ( 'MA', 'Q2', 6000 );
INSERT t1 VALUES ( 'MA', 'Q3', 5000 );
INSERT t1 VALUES ( 'MA', 'Q4', 3000 );
COMMIT;

SELECT * FROM t1 ORDER BY c1, c2;

So far, so good... the table is nicely normalized, everything's elegant... and useless:

c1 c2 c3
AZ Q1 5000
AZ Q2 5000
AZ Q3 1000
AZ Q4 3000
CA Q1 1000
CA Q2 2000
CA Q3 9000
CA Q4 7000
FL Q1 9000
FL Q2 7000
FL Q3 2000
FL Q4 1000
MA Q1 2000
MA Q2 6000
MA Q3 5000
MA Q4 3000
NY Q1 4000
NY Q2 5000
NY Q3 1000
NY Q4 6000

What folks often want to see is something like this, sales by quarter for each state:

c2 AZ CA FL MA NY
Q1 5000 1000 9000 2000 4000
Q2 5000 2000 7000 6000 5000
Q3 1000 9000 2000 5000 1000
Q4 3000 7000 1000 3000 6000

Here's how you can do that in SQL Anywhere:

-- Part 2: Pivot c1 values into columns.

BEGIN
DECLARE @sql LONG VARCHAR;
SET @sql = 'SELECT c2';
FOR f_fetch
AS c_fetch NO SCROLL CURSOR FOR
SELECT DISTINCT t1.c1 AS @c1
FROM t1
ORDER BY t1.c1
FOR READ ONLY
DO
SET @sql = STRING (
@sql,
', SUM ( ( IF t1.c1 = ''',
@c1,
''' THEN 1 ELSE 0 ENDIF ) * t1.c3 ) AS "',
@c1,
'"' );
END FOR;
SET @sql = STRING (
@sql,
' INTO #t1 FROM t1 GROUP BY c2' );
MESSAGE @sql TO CONSOLE;
EXECUTE IMMEDIATE @sql;
SELECT * FROM #t1 ORDER BY c2; -- pivot table
END;

What if you want to see sales by state for each quarter?

c1 Q1 Q2 Q3 Q4
AZ 5000 5000 1000 3000
CA 1000 2000 9000 7000
FL 9000 7000 2000 1000
MA 2000 6000 5000 3000
NY 4000 5000 1000 6000

Here's the code for that:

-- Part 3: Pivot c2 values into columns.

BEGIN
DECLARE @sql LONG VARCHAR;
SET @sql = 'SELECT c1';
FOR f_fetch
AS c_fetch NO SCROLL CURSOR FOR
SELECT DISTINCT t1.c2 AS @c2
FROM t1
ORDER BY t1.c2
FOR READ ONLY
DO
SET @sql = STRING (
@sql,
', SUM ( ( IF t1.c2 = ''',
@c2,
''' THEN 1 ELSE 0 ENDIF ) * t1.c3 ) AS "',
@c2,
'"' );
END FOR;
SET @sql = STRING (
@sql,
' INTO #t1 FROM t1 GROUP BY c1' );
MESSAGE @sql TO CONSOLE;
EXECUTE IMMEDIATE @sql;
SELECT * FROM #t1 ORDER BY c1; -- pivot table
END;

Here's where the magic lies, in the SUMs of row values multiplied by 1 or 0; the following SELECT statements are generated by the code shown above:

SELECT c2,
SUM ( ( IF t1.c1 = 'AZ' THEN 1 ELSE 0 ENDIF ) * t1.c3 ) AS "AZ",
SUM ( ( IF t1.c1 = 'CA' THEN 1 ELSE 0 ENDIF ) * t1.c3 ) AS "CA",
SUM ( ( IF t1.c1 = 'FL' THEN 1 ELSE 0 ENDIF ) * t1.c3 ) AS "FL",
SUM ( ( IF t1.c1 = 'MA' THEN 1 ELSE 0 ENDIF ) * t1.c3 ) AS "MA",
SUM ( ( IF t1.c1 = 'NY' THEN 1 ELSE 0 ENDIF ) * t1.c3 ) AS "NY"
INTO #t1
FROM t1
GROUP BY c2

SELECT c1,
SUM ( ( IF t1.c2 = 'Q1' THEN 1 ELSE 0 ENDIF ) * t1.c3 ) AS "Q1",
SUM ( ( IF t1.c2 = 'Q2' THEN 1 ELSE 0 ENDIF ) * t1.c3 ) AS "Q2",
SUM ( ( IF t1.c2 = 'Q3' THEN 1 ELSE 0 ENDIF ) * t1.c3 ) AS "Q3",
SUM ( ( IF t1.c2 = 'Q4' THEN 1 ELSE 0 ENDIF ) * t1.c3 ) AS "Q4"
INTO #t1
FROM t1
GROUP BY c1

The "SUM IF 1 OR 0" trick is an old one, used by generations of programmers to write funky code for icky problems, and not just in SQL. In fact, the code shown above is really simple compared with what goes on in the world, just a starting point.

If folks are interested I've got a couple of other demos that build on this technique... not the raw incomprehensible code you find in real-world applications, but hammered down into the basics for presentation... that's actually harder to do, the hammering down, harder than writing the original incomprehensible stuff :)

Monday, December 28, 2009

The beta is awesome! (2)

It's a big step for Foxhound when a new version of SQL Anywhere is released.

First, Foxhound has compile on Version 12, then it has to run properly against target databases created with versions 5.5 through 11.

What is Foxhound? It's a database monitor and schema display utility for SQL Anywhere databases, currently in development with its own beta planned for 2010.
Foxhound also has to recognize target databases created with version 12, and then it has to work properly with those target databases... it's one thing to get Foxhound to stop rejecting "12" as a database version number, quite another matter to get Foxhound to handle version 12's enhancements and behavior changes.

But, first things first: Foxhound compiles cleanly on the SQL Anywhere version 12 beta with no code changes, and it passes a simple smoke test.

Woohoo! That's no mean feat... virtually all of Foxhound is written in SQL...
  • 80,000 lines of rather funky Watcom SQL, up from 60,000 lines a year ago,

  • 200 web services, procedures, events and triggers,

  • 340 tables and views with 2600 columns, plus

  • 1,300 lines of C in 9 external procedures.
So, thank you, iAnywhere Solutions, for (a) not shipping broken code and (b) not breaking my code!

Tuesday, December 22, 2009

When will SQLA go live?

The SQL Anywhere question & answer site SQLA will probably go live sometime in 2010, possibly before the US midterm elections (what, isn't EVERYONE waiting to see what happens on November 2? :)

Here are some points to consider:

...and maybe there will be a Beta 8, who knows?
  • There are a lot of little bugs in the underlying software, you've probably seen them and been just as irritated by them as I have. Feel free to report them on meta.stackexchange.com, but if you do, you'll probably see they've already been discussed... which is why I don't bother sweating the small stuff.

  • There are quite a few features that are "stubbed out" (not yet implemented) in the administration areas "admin", "mod" and "tools". The big one, IMO, is called "Download Your StackExchange Database". That's huge. SQLA will never go live without that one.

Not ever.


Allow me to elaborate: The creator of StackExchange just lost his entire blog because he didn't take responsibility for backing up his own data. SQLA is not my data, it is your data. It's one thing for Jeff Atwood to be careless with his own data, that's his problem. It would be an entirely different matter for me to take the same risks with your data. I don't care how safe the Fog Creek infrastructure is... blah blah blah cloud computing blah blah blah.



Until there is a reasonably convenient and absolutely reliable way for me to back up SQLA content, it ain't ever going live.



Here's what I really think: The backup problem will go away long before StackExchange goes live, and we'll be able to "pump up the volume" (invite more participation in SQLA) sometime in January or February.

That will happen before SQLA goes "live"... it will still say "govern yourself accordingly", but it'll be a lot more fun!

Saturday, December 19, 2009

The beta is awesome!

I'm probably violating some part of the EULA just by saying that, but I don't care.

Folks who join the SQL Anywhere 12 beta can read my article "Top 1 Cool New Features In SQL Anywhere 12" in the beta newsgroup... that's where I talk about how much adjective deleted noun deleted are.

Then there's the follow up "Top 2 Cool New Features In SQL Anywhere 12" where I discover the new noun deleted feature.

The best part, it hasn't verb deleted, not once!

Tuesday, December 15, 2009

Good Luck Glenn!

Good luck Glenn, on today's webcast....

Object Relational Mappers: Friend or Foe?


Join the SQL Anywhere experts for a deep dive discussion on Object Relational Mappers.

Object relational mappers (ORMs) such as LINQ, Hibernate, and ActiveRecord bridge the gap between the relational database world, and the object-oriented world. By abstracting the database into "virtual database objects", they let programmers develop in any language and environment that they like without ever writing a line of SQL. It sounds great, but is the ORMs sweet song actually a siren's call? This talk will put ORMs on trial to help us find the answer.

Presenter: Glenn Paulley, Director of Engineering

Date: Tuesday December 15th
Time: 7am PST / 10am EST / 3pm GMT / 4pm CET
or 11am PST / 2pm EST / 7pm GMT / 8pm CET

Thursday, December 10, 2009

Why SQLA Exists

The SQL Anywhere question and answer website SQLA exists for questions like this

What particular statistics should one look at to help decide the best database page size to use?
and answers like this.

That doesn't mean you can't ask questions like "Where does the semicolon go?", those are perfectly fine and will be answered quickly and politely... but you've gotta appreciate the gems!

Monday, December 7, 2009

Object Relational Mappers: Friend or Foe?

Folks who know me, even just a little, know where I stand on the subject of Object Relational Mappers: Friend or Foe?

For everyone else, here's a hint: ORMs are like this Safety Device for Walking on Icy Pavements...



When you slip on ice, your foot kicks paddle (A), lowering finger (B), snapping turtle (C) extends neck to bite finger, opening ice tongs (D) and dropping pillow (E), thus allowing you to fall on something soft.

Which brings us to this webcast...

...I can't wait to hear what Glenn has to say!

Object Relational Mappers: Friend or Foe?

Join the SQL Anywhere experts for a deep dive discussion on Object Relational Mappers.

Object relational mappers (ORMs) such as LINQ, Hibernate, and ActiveRecord bridge the gap between the relational database world, and the object-oriented world. By abstracting the database into "virtual database objects", they let programmers develop in any language and environment that they like without ever writing a line of SQL. It sounds great, but is the ORMs sweet song actually a siren's call? This talk will put ORMs on trial to help us find the answer.

Presenter: Glenn Paulley, Director of Engineering

Date: Tuesday December 15th
Time: 7am PST / 10am EST / 3pm GMT / 4pm CET
or 11am PST / 2pm EST / 7pm GMT / 8pm CET

Monday, November 30, 2009

RIVA The Robot In The News

RIVA The Robot was mentioned here back in July...



RIVA stands for Robotic IV Administration, it uses SQL Anywhere for its database, and it's back in the news again: Should Pittsburgh pharmacies purchase robots to prepare your IV antibiotics and chemo drugs?

Sunday, November 22, 2009

SQLA, Two Weeks Later

It has been two weeks since the SQL Anywhere Question and Answer website SQLA was announced here, and it's been one week since the first status report.

Another slow(er) week


The total number of questions rose from 25 to 44. That's less than double, indicating that posting activity was slower in the second week. Also, a significant number of questions were of the administrative variety, so nobody better get excited about SQLA being crushed by its own success or anything like that.

Not yet, anyway.

The number of users rose from 29 to 35... nope, not exciting yet.

But they are good users, and they've been asking some great questions, more on that later.

Here are the StatCounter numbers for the nine full days since the hidden JavaScript thingie was plopped onto the "Sidebar Low" area (which sits at the bottom-right of some - not all - of the SQLA page displays):



Top Four Questions


Here are the top four new questions from SQLA's second week of operation:
Troubleshooting High Temporary File Usage

How does SQL Anywhere pass parameters?

Product Suggestion: Please implement record variable type

What’s the size of your biggest database?
Here's the top five from the first week:
Why should I use SQL Anywhere for my next project?

Is there already an iAnywhere position on this new website?

Does parameter passing degrade stored procedure performance?

What is the best refresh strategy for materialized views?

What is the best way to simulate Oracle Autonomous Transactions in SQL Anywhere?
Is it just me, or are some of the questions and answers starting to look more like magazine articles or blog posts than tech support cases?

There's room for both, methinks. There's room for pretty much anything that's relevant.

Development is proceeding. Honestly. Trust me.


The FAQ still hasn't been updated. Instead, a bunch of questions tagged "faq" have been posted, 14 at last count. So it's not like there's no work being done, just not any hard work :)

Here are a few of the more significant ones:
Poll: Is it OK for vendors to post questions?

What is the backup and recovery strategy for SQLA?

Exhortation: Do not mark anything “community wiki”

It's hard being a tag


Tag population control is in effect at SQLA.

SQLA has its own Search facility, plus there's always Google, so there doesn't seem to be much point in defining a bazillion different tags for the purpose of improving search. Plus, it's really hard work (ask anyone who's had to create a book index), and very few people do a good job (ask me about the mediocre job I did on my book).

So, when a tag gets used more than once, it's going to get looked at to see if it should be renamed, eliminated, merged with another tag, etcetera, all with the goal of using tags to classify or categorize the question.

Users are completely free to define new tags, five per question if they want (the software-imposed limit). It's only when a tag gets used on more than one question is it going to be a candidate for euthanasia, er, revision.

BTW, there is a new "SQLA" tag (category, label, whatever) on this blog so you can see all the posts about SQLA at once.

Training begins for the backup administrator


A volunteer for the post of backup SQLA administrator has been accepted, and training begins on Tuesday. Then, while the primary administrator lies face-up by the pool, the backup administrator will be responsible for keeping SQLA free from evil-doers.

For that role the backup administrator will be wearing a supersuit, with cape.

The SQLA Lottery


The pirate chief, er, primary administrator has started giving out random bounties of 100 reputation points, for no particular reason other than it's important for people to have points.

Three such bounties have already been handed out (which accounts for the fact the administrator is no longer first place in the points) and two bounties remain available... essentially for the asking.

One prediction, one boast


SQLA activity will not increase significantly any time soon, and might even decrease:
  • It's all in beta, the software and the site, and some people don't do beta.

  • We're in one of those no-real-work-gets-done-for-weeks-on-end periods, this one tagged "Thanksgiving-Christmas-New-Years".

  • SQLA has not been officially announced; i.e., nobody's promoted it on the NNTP forums.
But... SQLA will eventually be recognized as perfectly suited to the task, of that there is no doubt.

Saturday, November 21, 2009

Cloud Computing with SQL Anywhere

Apparently I don't check my email very carefully because I missed the original announcement of this webcast:



Cloud and Multi-Tenant Architectures with SQL Anywhere Webcast

SQL Anywhere supports a variety of capabilities that ease the shift from an on-premise database server to a hosted server environment. This session will examine different architectural approaches for designing and developing multi-tenant applications to be hosted in a SQL Anywhere Server. Additionally, several operational considerations for hosted SQL Anywhere environments will be discussed.

Presenter: Chris Kleisath, Sr. Director of Engineering

Date: Tuesday, November 24, 2009
Time: 7am PST / 10am EST / 3pm GMT / 4pm CET
or: 11am PST / 2pm EST / 7pm GMT / 8pm CET
Yes, that's this Tuesday coming up. Click here to register.

If you can't attend, you can probably get most of the material from the five-part series starting here: Multi-Tenant Database Architecture – Part 1.

But... there's always a "but"... if you can watch the webcast you should watch the webcast because Chris is always entertaining when he speaks.

Friday, November 20, 2009

What is the backup and recovery strategy for SQLA?

Nobody wants another Magnolia.

Here's the current situation: The SQLA question & answer site for SQL Anywhere runs on StackExchange software and is hosted by Fog Creek. According to an email from Joel Spolsky: "It is actually the same as Fog Creek hosting (it’s on the same infrastructure as what is described in that article)."

That takes care of part of SQLA's backup and recovery strategy: We trust Fog Creek, they operate on a far higher plane than Magnolia ever did.

(Magnolia was named after the Greek god of cluelessness, and it has now been re-launched as "Gnolia" which is Latin for "missed business opportunity".)
The second part of SQLA's strategy is the "verify" part of "trust but verify". It is expected that before the StackExchange service goes live (it is in Beta now, just like SQLA is), the "Download Your StackExchange Database" site management option will be implemented.



Having said all that, there are gaps, like "Will it be possible to upload the StackExchange data we downloaded?"

And, "How would we migrate to a different hosting service?"

Don't know, do care (very much), too early to know the answers.

Wednesday, November 18, 2009

Come to Candia!

Here's an email I got Monday from the International Sybase User Group.

I am sure everyone from the USA is welcome, not just folks from the nothern part.

Caution: Candia can be cold in December so bring a sweater!



Dear Sybase Enthusiast,

Please join us on December 1st and 2nd, 2009 for the ISUG Canadian Technical Summit to be held in the Candian Capital - Ottawa!

For the first time, Ottawa will be hosting a two day event drawing together many Sybase professionals and 3rd party vendors from Canada and the nothern USA. This event will have two streams - Data Management and Development. You will be able to register for either one or better yet, make sure that you bring a colleague with you so that you can cover both agendas. There is even a planned "cocktail reception" on the Tuesday night (Dec 1st).

The event will cover subject areas such as: SMS messaging from PB 12.NET, Taking your PowerBuilder applications to the Web; Data Warehousing, Replication, Sybase and SAS, Data Modeling, Database Monitoring and Performance, ASE and PB tools, Product Futures, Mobility, etc just to highlight some key areas.

On the Development side we will see evangelist John Strano showing us the latest PB 12.NET from engineering, best practices and another training session. For Data Management we will have key Sybase personnel addressing key product futures, Mobility and presentations on comparing various Data Modeling approaches. You will have access to key Sybase technical staff from Canada and the USA to ask questions about Sybase products, interact with users utilizing the same technologies and gain key information into 2010 based products and features.

For more information and to see a complete list of topics covered, please see our registration page. You'll notice that to register you must be a member of the International Sybase User Group (ISUG). You can become a member directly at http://www.isug.com/na/SelectOptions.html or by joining the Ottawa Sybase User Group (OSUG) at http://www.isug.com/na/OSUG.html. All members of OSUG are automatically members of ISUG as well! You can register with a free Associate Member account, but we encourage you to become a full Regular Member if you can.

For questions about and support for this event, you can contact ISUG's North American Regional User Group Director and OSUG President, Chris Pollach (chris@isug.com). Chris will be happy to answer any questions you may have and assist you with registering if necessary.

We look forward to seeing you in December!

Regards,
The ISUG Events Team

Sunday, November 15, 2009

SQLA, One Week Later

As of 7:20 AM EST, Sunday November 8 2009, the SQLA question and answer website was up and running and announced, making today the one week anniversary.

For you history buffs, work on SQLA began around 1 or 2 AM on November 8... seriously, six hours from project inception to live beta, it's that easy to set up a StackExchange site. Before 1 AM it was a just a to-do: "try out StackExchange beta".

In fact, the site was created from scratch twice, once using the wrong site name (gotta respect those trademarks!)

Here are the usage numbers


According to the SQLA software itself, there are now
  • 29 registered users,

  • 25 questions,

  • 46 answers and

  • 42 comments, and there have been

  • 850 views.
According to StatCounter, for the one full weekday that it was told to accumulate SQLA statistics (Friday), there were:
  • 532 page views,

  • 83 unique visitors and

  • 40 returning visitors.
Considering that there has been no mention of SQLA on any of the NNTP forums yet, I think the numbers are... low? high? just right?

Top Five Questions


Chosen subjectively by a panel of judge, based on content and activity:

Why should I use SQL Anywhere for my next project?

Is there already an iAnywhere position on this new website?

Does parameter passing degrade stored procedure performance?

What is the best refresh strategy for materialized views?

What is the best way to simulate Oracle Autonomous Transactions in SQL Anywhere?

Comments are being used as a substitute for threaded discussions


For many years I have clung to the idea that threaded discussions are absolutely necessary for having, well, discussions. One hundred percent of the HTTP-based implementations of threaded discussions suck, when compared with NNTP (newsgroups). That includes purely-web-based discussion sites, all the web interfaces to newsgroup servers, even the re-incarnation of Google Groups. They are either slow, or unusable, or both.

Only classic port 119 (NNTP) clients like Forte Agent work well for threaded discussions.

Or so I believe(d).
(If there was a page for "Late Adopter" in Wikipedia, it would have my picture.)
The trouble is, all the world's firewalls are closing down port 119. And new features are coming to the web, not newsgroups.

So, now we have SQLA. Wonderful interface, fast enough, but... no threaded discussions.

Or are there? It is starting to look like being able to
  • post multiple answers,

  • and post multiple (albeit short) comments on each answer,

  • AND post comments on the question itself,

  • as well as editing the answers and even the question,
is a pretty [expletive deleted] good alternative to threaded discussions.

Well, I'm not sure about the "editing the answers and even the question" part, that's not really happening yet and I'm not sure it should (see later point "Shy people are still shy").

Out there in the blogosphere people are having endless discussions using comments, with and without cheesy "nesting" as a substitute for threading, and the overwhelming volume of traffic says it's working. Here at SQLA, the multiple-answers-multiple-comments features should be much better/easier than that.

Plus, it's easy to type a twitter-style "@username:" prefix on your comment, the cyberspace equivalent of the meatspace shout "Hey, Joe, I think we might have a solution for you, come on over, let's talk!"

Maybe it will work, maybe it won't. I think it will. I think it will work very well for "How do I..." questions, and even better for discussions about future product features... possibly even better at that than the NNTP forum.

We'll see.

Will SQLA replace the NNTP forums? Don't know, don't care. It's like cellular, some people still use radio telephones ... honestly, I didn't know that either, but it's true, and they have reasons (like, "it's the law", stuff like that).

Will Breck still answer questions on the NNTP forums? Sure will! That's the point, answering the questions... not having a protocol war, but helping people.

What will happen when Sybase/iAnywhere implements a modern web-based community site? That's a good question ... [struggle] [microphone drops] ... We have no comment on that at this time.

Voter turnout is low


A total of 30 up-or-down votes have been cast. That represents a voter turnout of 1.5% according to the following absurd formula:
  • each user can vote each question up or down, except their own

  • each user can vote each answer up or down, except their own

  • there are 29 users, 25 questions and 46 answers

  • which comes out to an theoretical maximum of 29*25 - 1*25 + 29*46 - 1*46 = ...

  • wait for it...

  • 1988 possible votes

  • or 30/1988 = ...

  • 1.5% voter turnout
That formula is absurd because it doesn't account for
  • the fact that not every user looks at every question and answer

  • the fact that users don't necessarily form an opinion about every thing they read

  • and the fact that down-votes should probably be rare, perhaps almost non-existent.
Still, 1.5% feels low. Voting is a powerful feature for making SQLA better.

Maybe 3% turnout is a goal worth seeking. Plus, getting more folks who ask questions to check the answer they like the best. And getting folks to click the "Favorite" star.

Early adopters are behaving well


Nobody has voted anything down into negative-points territory, or at least nothing's been voted down past zero points. That's OK with me.

Nobody has edited anything except their own stuff, at least as far as I can tell.

In fact, nothing bad is happening at all. That is *not* a surprise.

Shy people are still shy


I don't know of any way to *guarantee* people will become less-shy about asking questions, but there are an infinity of ways to guarantee people will *not* participate. You can see some of those morale-destroying techniques in action over at StackOverflow. The software is wonderful but a significant minority of the active StackOverflow participants are arrogant [expletive deleted]s ... my [insincerity alert] apologies in advance, but there's no other way to put it.

That won't happen at SQLA, it's moderated.

But the real reason it won't happen is this: The SQL Anywhere user community consists of folks who are treat each other with respect.

So far, "SQLA Moderator" has been the easiest job in the world. It's probably illegal to have this much fun.

And finally...


Here is StatCounter's view of where SQLA page views came from for the last couple of days.



Question: Did the user on the shores of Hudson Bay at the southern border of Nunavut answer a question asked by the user at the end of PA279 near the Xingu river and São Félix do Xingu in Pará, or was it the other way around, or neither case?