Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Cybernetic Vermin
Apr 18, 2005

you got that pretty backwards, the point is that if i have a database significantly smaller than the memory on the machine it is a monumental failure that fetching the complete result set of select * from t where x=y takes orders of magnitude longer than just putting t into some java arrays and making a hashmap from x to indices into this array

Adbot
ADBOT LOVES YOU

Zombywuf
Mar 29, 2008

Cybernetic Vermin posted:

you got that pretty backwards, the point is that if i have a database significantly smaller than the memory on the machine it is a monumental failure that fetching the complete result set of select * from t where x=y takes orders of magnitude longer than just putting t into some java arrays and making a hashmap from x to indices into this array

A few hundredths of a ms to get poo poo like atomicity and the ability for ops to be able to look at the data sounds good to me.

Cybernetic Vermin
Apr 18, 2005

yeah, no, the "oh well db2/oracle/someshit is an industry standard and we can get dbas for those" is not really a good case for why the old sql dragons aren't total poo poo. the slowdown has nothing to do with atomicity, it is all lovely old data structures with lovely old protocols marshalling single records around in the worst way possible at every turn, with a lovely old query optimizer ready to screw you over in production at any moment because it has no concept of the lovely old lock contention bullshit that the sql dragons pull at the drop of a hat since they process queries so freakishly slow that they are sure to get a backlog at every possible moment

double sulk
Jul 2, 2010

Run incredibly fast, scalable queries with the power of MongoDB today.

Cybernetic Vermin
Apr 18, 2005

yeah that doesn't work either, but the nosql movement has at least one thing right, throw sufficiently many monkeys at this problem and someone will sooner or later do better than oracle with relative ease

MononcQc
May 29, 2007

Yeah NoSQL is loving dumb

*reads a shitload of data from memcached all the time*

Squinty Applebottom
Jan 1, 2013

microsoft and postgres did already? just pick either of them, they should suit your needs

if your data is small, just use an in memory sqlite database and periodically flush to the drive if you want or some poo poo i dunno

Cybernetic Vermin
Apr 18, 2005

postgres is too lovely to make the list, never worked with mssql. the small stupid in-process in-memory sql databases do surprisingly ok work though, we seriously ran a pretty critical production job off of hsqldb after db2 threw up all over itself for the nth time, still leaves you to handle the entire persistence and integrity bit though, so there are more complete solutions that are faster still out there

pointers
Sep 4, 2008

Zombywuf posted:

Anyone got any pro-tips on dealing with a death march?
keep your head down, get your poo poo done, drink with coworkers

Posting Principle
Dec 10, 2011

by Ralp

Cybernetic Vermin posted:

still leaves you to handle the entire persistence and integrity bit though,

its a great database once you implement a database on top of it

Zombywuf
Mar 29, 2008

Cybernetic Vermin posted:

yeah, no, the "oh well db2/oracle/someshit is an industry standard and we can get dbas for those" is not really a good case for why the old sql dragons aren't total poo poo. the slowdown has nothing to do with atomicity, it is all lovely old data structures with lovely old protocols marshalling single records around in the worst way possible at every turn, with a lovely old query optimizer ready to screw you over in production at any moment because it has no concept of the lovely old lock contention bullshit that the sql dragons pull at the drop of a hat since they process queries so freakishly slow that they are sure to get a backlog at every possible moment

Yeah, lern 2 database.

Shaggar
Apr 26, 2006

Cybernetic Vermin posted:

to be fair p. much all sql databases are incredibly lovely

tons of good ideas for running with 1 meg of memory in the 70s but today you need to hire an oracle consultant for a million dollars to get speedy queries in a 20 gig database on a server that has 32 gigs of ram

fast databases are ez even with not a lot of resources.

Socracheese
Oct 20, 2008

our database at work is huge and the queries are really fast i think the trick is not designing it like a retard

Squinty Applebottom
Jan 1, 2013

nvarchar primary keys are pretty mandatory for good performance

Shaggar
Apr 26, 2006

Cybernetic Vermin posted:

yeah, no, the "oh well db2/oracle/someshit is an industry standard and we can get dbas for those" is not really a good case for why the old sql dragons aren't total poo poo. the slowdown has nothing to do with atomicity, it is all lovely old data structures with lovely old protocols marshalling single records around in the worst way possible at every turn, with a lovely old query optimizer ready to screw you over in production at any moment because it has no concept of the lovely old lock contention bullshit that the sql dragons pull at the drop of a hat since they process queries so freakishly slow that they are sure to get a backlog at every possible moment

if ur queries are slow its either bad design (for u this is probably it), a bad server (this is also u if ur using MySQL or some other faildb), or if you don't have enough resources (memory/disk).

if you let your orm design the database its gonna be total poo poo now and forever cause ur design is poo poo and your code is poo poo and hibernate is poo poo and all of that will combine to make your data design triple-combo poo poo.

if ur using a MySQL then just kill urself now. use sql server ftw.

lastly, if you can prove its not the first 2 (you probably cant so don't try) then throw some faster disk / more ram at it.

Squinty Applebottom
Jan 1, 2013

normalization is like super easy, i dont understand why developers are so bad at it or choose to not do it

Shaggar
Apr 26, 2006
because most of them are bad and then theres web "developers" which don't really count as people.

Shaggar
Apr 26, 2006
persistence model is for lazy shitheads who hate both performance and data

Zaxxon
Feb 14, 2004

Wir Tanzen Mekanik
Can you even ... like *STORE* data man?

JawnV6
Jul 4, 2004

So hot ...

i barely GNU her! posted:

3. You can do the equivalent, better, using maps and reduces.

this is the exact opposite reaction that the confused "mapreduce sux!!" paper by database experts should cause

Cybernetic Vermin
Apr 18, 2005

Shaggar posted:

lastly, if you can prove its not the first 2 (you probably cant so don't try) then throw some faster disk / more ram at it.

did multi-terabyte financial databases for years, including the 200 gigabyte intraday database which we did indeed solve by having 256 gigabytes of ram

sql databases are poo poo

had an ex-ibm executive on the board that pushed for replacing poo poo with db2, an effort that every time was hugely expensive and always turned out amazingly poo poo (after ibm had gotten a couple of million in consulting fees of course)

Cybernetic Vermin fucked around with this message at 18:33 on Mar 14, 2013

Shaggar
Apr 26, 2006
financial dbs are probably the worst designed ever. especially old ones.

Zombywuf
Mar 29, 2008

Cybernetic Vermin posted:

did multi-terabyte financial databases for years, including the 200 gigabyte intraday database which we did indeed solve by having 256 gigabytes of ram

tps?

Sapozhnik
Jan 2, 2005

Nap Ghost
idgi what's wrong with postgresql, it seems to be good at doing the sorts of things you should be doing in a database

oracle is "good" if a company that makes money selling database licenses tells you that you should do more stuff in the database and you actually listen to them

Zombywuf
Mar 29, 2008

Mr Dog posted:

idgi what's wrong with postgresql, it seems to be good at doing the sorts of things you should be doing in a database

The query optimiser deserves a special place in hell for being excellent right up to the point where it just gives up and gives you a query exponential in the number of joins.

Cybernetic Vermin
Apr 18, 2005

Ok, a bit of a serious-post: If your sql server works for you, fine, great, have fun. They certainly get the integrity and safe persistence thing done. However, if all you work with are the sql servers you easily get a bit weird expectations. Way too many developers tout the safety of the big sql databases, but then write applications that fetches a bunch of data out of them, finish the transaction, and keep working on that data, or serve it as cached data for later requests. This is often necessary for performance due to database overheads. Then you have squandered a lot of the integrity immediately. There are a lot of weird lighter-weight databases do things a bit differently than the sql dragons, but, really, they cut down on the many overheads, and if you are willing to throw a bit more memory on things, you get into a situation where you are able to actually work directly in the database, always maintaining the integrity. MongoDB is a stupid example, but there are much better ones out there, and DB2/Oracle/MySQL/whatever are rightly getting displaced in many tasks.

Ignoring baseline performance the old sql assumptions are also unpredictable, a query optimizer sounds good in theory, but getting a query reoptimized in production is a horror, because even if the new query looks faster based on the internal statistics it may hold some important lock a fraction longer than the previous execution plan, and suddenly the lock contention takes of exponentially for the sky. The complex locking behavior is also a bit of an anachronism, one of the core reasons why it is easy to outperform the sql servers is that it is way better to race to finish for a vast majority of queries, do a coarse lock and get it finished quick, complex locking slowing down the queries means more queries are in flight at once, making locking issues more and more likely.

tef
May 30, 2004

-> some l-system crap ->

Zombywuf posted:

Anyone got any pro-tips on dealing with a death march?

gently caress off to america for a month and continue phoning it in, as every feature or line of code you write causes yet another snowflake deployment outside of your control.

Tiny Bug Child
Sep 11, 2004

Avoid Symmetry, Allow Complexity, Introduce Terror
i would like a sql that you could just bolt more servers onto to make it faster

Janitor Prime
Jan 22, 2004

PC LOAD LETTER

What da fuck does that mean

Fun Shoe

Tiny Bug Child posted:

i would like a sql that you could just bolt more servers onto to make it faster

same

Shaggar
Apr 26, 2006
2012 has some new replication stuff i guess that does that kinda.

Janitor Prime
Jan 22, 2004

PC LOAD LETTER

What da fuck does that mean

Fun Shoe
I'm sure you can't write to those slave servers without loving everything up can you?

Shaggar
Apr 26, 2006
it has some new active/active/active clustering thing iirc. there are probably special things you have to do to the database + tables to get it to work tho. like auto-increment keys probably wouldn't work. idk.

Janitor Prime
Jan 22, 2004

PC LOAD LETTER

What da fuck does that mean

Fun Shoe

Shaggar posted:

it has some new active/active/active clustering thing iirc. there are probably special things you have to do to the database + tables to get it to work tho. like auto-increment keys probably wouldn't work. idk.

yeah that's why I think most surrogate keys are now GUIDS instead of auto increment to alleviate those kinds of problems

Shaggar
Apr 26, 2006
right. guids are ftw.

Zombywuf
Mar 29, 2008

Tiny Bug Child posted:

i would like a sql that you could just bolt more servers onto to make it faster

I like the SQL where I just write some code and it goes faster.

Zombywuf
Mar 29, 2008

Shaggar posted:

right. guids are ftw.

Hope you're not planning on large inserts.

Condiv
May 7, 2008

Sorry to undo the effort of paying a domestic abuser $10 to own this poster, but I am going to lose my dang mind if I keep seeing multiple posters who appear to be Baloogan.

With love,
a mod


Been using H2 as my babby's first database, seems ok so far but I only have a couple of tables yet. Anything wrong with it for small database purposes?

Shaggar
Apr 26, 2006
nope.

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde

polpotpi posted:

normalization is like super easy, i dont understand why developers are so bad at it or choose to not do it

If I had understood closures and data normalization coming out of (ee) undergrad it would have changed... everything :sigh:

Adbot
ADBOT LOVES YOU

Nomnom Cookie
Aug 30, 2009



code review pfft. who cares

schema review. bad schemas end lives

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply