Forgot your password?

typodupeerror

Comment: Re:text versus CLOB (Score 1) 283

by Christian Smith (#40039759) Attached to: Moving From CouchDB To MySQL

like not having to declare varchar sizes versus text versus CLOB versus BLOB.

What's the difference between a text column and a character large object column? MySQL doesn't appear to have distinct types for the two.

Some databases limit the size of text and/or varchar data, so that rows have a limited size. Sybase, for example, used to have a 255 character limit in varchars, and a 2048 byte limit for row size (off the top of my head, details may be wrong.) To store any text larger than 255 characters, the data was effectively stored offline from the row, in a special table, with a reference to the large text in the row.

DB2 also has row size limits, rows not being able to be bigger than ~0.5 the tablespace page size, so this can also require text to be stored offline in LOB tables.

They're all stored and indexed and searchable in the same way (not that you'd want to index any sort of LOB.)

If CLOB is the same thing as text, then why wouldn't you want to support a full-text index on a CLOB? That said, I tend to write my own full-text indexing tools to work around the limitation in MySQL's full-text index: no words shorter than four characters unless you're root, no common English words unless you're root, etc.

I was talking about a table index. As in:
CREATE INDEX foo_idx ON foo(textfield);

This is not the same as a full text index, which generally stores an index row for each distinct word in the source row.

Comment: Re:How is XML indexed? (Score 1) 283

by Christian Smith (#40018529) Attached to: Moving From CouchDB To MySQL

Does it act like SQLite, which is dynamically typed

That's one of the annoying thing to me about SQLite,

Either constraints are good or they are bad. Typing is just another constraint, like foreign keys, and various other domain constraints. I cannot see any valid argument for having foreign keys but not type constraints. It jest seems bizarre to me. It's not like they could be optional or anything.

Foreign keys are good, but type independent. You just want to check that some foreign key actually references valid data in another table. If they match, they match.

However, typing in SQL is almost certainly a case of implementation details leaking through the abstraction layer. The data type is defined by the data and how it is used. Traditional SQL databases require that type data up front so they can organise the data on disk. But you shouldn't care how data is organised on disk.

When comparing dates, the data type is implicitly some form of timestamp. Whether that is stored on disk as a string with a "YYYY-MM-DD HH:SS" format, or as a UTC integer offset from 1970-01-01 00:00, it doesn't matter. Using the SQLite way, the two can be transparently stored and compared. There are probably better examples, like not having to declare varchar sizes versus text versus CLOB versus BLOB. They're all stored and indexed and searchable in the same way (not that you'd want to index any sort of LOB.)

And if you don't like it, just declare the types of the columns up front, and SQLite will use type affinity to convert the data for storage.

Personally, I like the optional typing in SQLite.

Comment: Re:Sounds legit (Score 2) 292

by Christian Smith (#39074161) Attached to: SSD Latency, Error Rates May Spell Bleak Future

And to make matters worse they don't "fail gracefully" as the old spinning rust does. honestly i can't remember a HDD that failed without warning in the past....oh hell the last one was probably a Deathstar around 2000, no thanks to SMART you'll usually get SOME kind of indication, be it SMART or noise or weird errors, something, and then you can get your data off. My gamer customers went back to running raptors in RAID because they bought SSDs and lost data, just one day they flipped the switch and poof! No drive even in BIOS and no way for me to get a single byte of data back.

FLASH does (should) indeed fail gracefully. Once a block wears out, programming it will fail, and the FLASH and controller will know this and mark it bad. But other blocks will still be readable, and the now dead block contained no useful data (else the controller wouldn't be erasing it.)

What you're talking about are firmware based bugs, the controller not making the FLASH contents accessible. These problems are probably the result of block translation tables being corrupted, and is entirely the fault of the controller and firmware (not the FLASH.)

So no thanks, until and unless you can give me a drive that works 5 years without fail (And NO I don't give a crap about your warranty unless it covers data, does it? No? Then i don't care and neither will my customers as its not the drive we give a crap about, its our stuff) then me and my customers will stick with the spinning rust. Hell with Win 7 there is no need to boot, superfetch will load all your apps when you need them into RAM based on usage patterns, and with cameras and video sucking up ever more space what does SSD have to offer really? Maybe in servers where IOPS is king, but normal users already have machines MUCH faster than they are, SSD really offers them no benefits over spinning rust IMHO. Hell the new 2.5s even park the heads at the slightest movement so they don't fail like the bad old days. Better to simply use a super fast SDHC for readyboost in that laptop or get a hybrid than to risk losing all your stuff. At least in the hybrid if the NAND fails you still have a HDD that you can still get your stuff off of.

Certainly hybrid storage gives the best of both worlds. Using an SSD as a short term cache, that can be discarded if necessary is certainly one way to go.

But I no more trust a mechanical HD than FLASH to keep my data safe in the short/medium term. And HD can have firmware issues too.

FWIW, almost all my machines at home have SDD in one form or another, from a lowly Acer Aspire One netbook (8GB SSD - very crappy!) up to my work laptop with 80GB Intel G1 SSD. I've not yet lost data as a result of hardware failure over the two years I've had the various drives. Of course, a very small sample size.

Comment: Re:I thought it was for "human beings". (Score 2) 449

by Christian Smith (#38807229) Attached to: Ubuntu 12.04 To Include Head-Up Display Menus

I've been doing something similar on OS X.

Every application's Help menu item has a textbox that filters all menu items. You can also reach this textbox through a shortcut (cmd+shift+?).

So, for example, if I'm editing a document and I want to make some text superscript, Instead of hunting through its menus, I just hit cmd+shift+?, type 'sup' and hit enter.

Oh god, does this mean Apple have a patent on it?

Comment: Re:You lie! It's sad. (Score 3, Informative) 180

by Christian Smith (#38636172) Attached to: Kenya Seeks Nuclear Power Infrastructure

With sunshine and 30C+ temperatures throughout the year..."

This is a lie. A big one sadly. Despite being on the equator, Kenya and other countries that the equator crosses never have temperatures beyond 30 degrees Celsius for more than 3 months in a year.

In fact for Nairobi, their capital, you will freeze at night and temps never go beyond 28 degrees Celsius for most of the day. Google Nairobi weather (I just did) and you'll find temperature now (it's almost noon there) at 23 degrees Celsius.

Probably more to do with Nairobi's elevation. Nairobi is quite a way above sea level, the air thinner, and therefore not retaining as much heat as at sea level. But as solar cells or solar heating devices rely on solar radiation, rather than the resulting ambient heat, solar devices would be very effective nonetheless.

Remember the... the... uhh.....

Working...