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
fresh_cheese
Jul 2, 2014

MY KPI IS HOW MANY VP NUTS I SUCK IN A FISCAL YEAR AND MY LAST THREE OFFICE CHAIRS COMMITTED SUICIDE
i would love to see that analysis done on the dumb poo poo queries i wrote 30 years ago against the order tables that ran for 45 minutes or more.

it could not have been the real oltp tables, it had to be a datamart extract or they would have had an automated “kill any query that scans more than 20 rows” or something.

Adbot
ADBOT LOVES YOU

Feisty-Cadaver
Jun 1, 2000
The worms crawl in,
The worms crawl out.
a long time ago in old job we upgraded from sybase 11 to version 12 l think which is when they re-wrote the query planner

we were p aware on how to structure data and have queries that were sub-second response times 99% of the time but after the upgrade there were one or two that went totally pear shaped

thankfully there was a "don't do that" syntax that reverted those queries to the v11 query planner which fit the bill until I left for a better job

PIZZA.BAT
Nov 12, 2016


:cheers:


Deep Dish Fuckfest posted:

you're basically taking a side-gig as a query planner except you don't have the various stats an actual query planner uses to make decisions about which indices/join methods/etc to use and also it turns out you don't get asked the queries you thought you would get asked because someone changed their mind

fair enough but the entire point of nosql systems is that your queries should be pretty drat simple. if you find you regularly need sophisticated queries then you probably screwed up your model or as you said someone changed their mind

also there’s nosql systems nowadays with query planners & optimizers but they aren’t going to be nearly as sophisticated as sql ones because they don’t need to be

fart simpson
Jul 2, 2005

DEATH TO AMERICA
:xickos:

why not? the extra sophistication is bound to help somewhere

12 rats tied together
Sep 7, 2006

your queries are not so much simple as they are the focal point of the database. they can be complicated, but answering them as effectively as possible is the point, or else you'd just use a rdbms. sophistication is often bad for nosql systems because if you're using them you probably care about p99, sophistication makes answering questions about p99 harder.

redleader
Aug 18, 2005

Engage according to operational parameters

PIZZA.BAT posted:

someone changed their mind

luckily this is a rare situation, to the point of not being worth thinking about

PIZZA.BAT
Nov 12, 2016


:cheers:


redleader posted:

luckily this is a rare situation, to the point of not being worth thinking about
                                  /

animist
Aug 28, 2018

redleader posted:

query planner moment


:discourse:

animist
Aug 28, 2018
my hot take about query planners is that they should exist but be completely manual. You look at a high-level IR for your query and add in scheduling and index information. The array programming people have been doing this for a while (https://halide-lang.org/, http://tensor-compiler.org/) and it works surprisingly well.

(Unfortunately they're array programming people so they don't know they're doing query planning.)

spankmeister
Jun 15, 2008






who the gently caress is going to manually plan a query?

PIZZA.BAT
Nov 12, 2016


:cheers:


yeah one of the big selling points on sql is that non-programmers can pick it up pretty easily without really having to 'get' how computers work and forcing them to build their own query plans sounds like a great way to to get people to stop using it

if that's the point then go for it

redleader
Aug 18, 2005

Engage according to operational parameters
i love giving random people the ability to go and query for their own incorrect data

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

PIZZA.BAT posted:

yeah one of the big selling points on sql is that non-programmers can pick it up pretty easily without really having to 'get' how computers work and forcing them to build their own query plans sounds like a great way to to get people to stop using it

if that's the point then go for it

you only “force” them to do it if their queries need to be optimized for some reason; otherwise a more naive, easy-to-predict optimization set suffices

Archduke Frantz Fanon
Sep 7, 2004

redleader posted:

i love giving random people the ability to go and query for their own incorrect data

this is the marketing pitch for power bi

Visions of Valerie
Jun 18, 2023

Come this autumn, we'll be miles away...

Archduke Frantz Fanon posted:

this is the marketing pitch for power bi

the best sexuality

animist
Aug 28, 2018

Subjunctive posted:

you only “force” them to do it if their queries need to be optimized for some reason; otherwise a more naive, easy-to-predict optimization set suffices

yeah this is what halide does. By default it's just the obvious loop nests, then if you need to make it do something smarter you can do that.

honestly though it really isn't an accessible programming model. The only people actually using halide are compiler experts. You are always gonna need query planners to do the needful for 99.9% of users. I just want this for myself because I think it would be cool

hbag
Feb 13, 2021

i think its funny how sqlite has 5 datatypes. i mean thats all you really need (null, string, int, float, raw data) but still

redleader
Aug 18, 2005

Engage according to operational parameters
that's 4 more types than you need (bytes)

fart simpson
Jul 2, 2005

DEATH TO AMERICA
:xickos:

you only really need strings. the rest are derivable from that

Visions of Valerie
Jun 18, 2023

Come this autumn, we'll be miles away...
you only really need chars. the rest are indexable from that

Cybernetic Vermin
Apr 18, 2005

PIZZA.BAT posted:

yeah one of the big selling points on sql is that non-programmers can pick it up pretty easily without really having to 'get' how computers work and forcing them to build their own query plans sounds like a great way to to get people to stop using it

if that's the point then go for it

one of the intended selling points, it is moot though since non-programmers cannot do sql, and in fact most programmers can't either.

fart simpson
Jul 2, 2005

DEATH TO AMERICA
:xickos:

Cybernetic Vermin posted:

one of the intended selling points, it is moot though since non-programmers cannot do sql, and in fact most programmers can't either.

idk. my wife knows a bunch of excel crap and she picked up enough sql to make queries for the data she needed at byte dance and it only took her a couple weeks to get the hang of it. i guess you could call excelheads “programmers” tho

Cybernetic Vermin
Apr 18, 2005

fart simpson posted:

idk. my wife knows a bunch of excel crap and she picked up enough sql to make queries for the data she needed at byte dance and it only took her a couple weeks to get the hang of it. i guess you could call excelheads “programmers” tho

pretty sure your wife could also have done the query in a sensible order if that had been needed.

in general i think the query planner idea overestimates computation and underestimates people. not that people can do general discrete optimization problems better than computers (though computers are way worse at it than people in the 60s expected), but rather the human will almost invariably have a decent idea of what the data is (e.g. there's so many employees but only a couple of departments, etc.), and i think indices are actually really graspable to people (very real-world-relevant after all). just make sure the system is built such that you can gently caress up a couple of times without having it fall down. which, granted, a lot of database systems aren't.

my first fintech job you could reliably crash production if you ever entered a query to a time-series database that didn't filter on dates first.

Deep Dish Fuckfest
Sep 6, 2006

Advanced
Computer Touching


Toilet Rascal
wouldn't be a problem for me; i definitely get filtered on first dates

Asymmetric POSTer
Aug 17, 2005

Deep Dish Fuckfest posted:

wouldn't be a problem for me; i definitely get filtered on first dates

lol

Shaggar
Apr 26, 2006

Deep Dish Fuckfest posted:

wouldn't be a problem for me; i definitely get filtered on first dates

PIZZA.BAT
Nov 12, 2016


:cheers:


i think i’ve told this story before but the worst i’ve seen was when i was consulting a major health insurer where someone handed the keys to prod to a bunch of interns. they came to my office one day asking if i could come over to a meeting room they had to teach them how to write better queries because the one they had wasn’t working well. i go over and one of them has their screen up on the wall and immediately i see that their problem is that they’re doing the equivalent of a select all with no filters and tons of joins and yadda yadda yadda. it’s sitting there spinning away and my eyes meander to the endpoint url and i poo poo a brick. the interns thought they were all gonna get fired lol

that was a fun one to take back to their director

Powerful Two-Hander
Mar 10, 2004

Mods please change my name to "Tooter Skeleton" TIA.


Archduke Frantz Fanon posted:

this is the marketing pitch for power bi

I have unironically heard this said by a tech manager and it's like, no not really. and I say that as someone that now uses power bi.

I mean if your data sources are built out as specific sets for you then maybe, but that means someone has gone through and done it for you based on spec.

or you just did a bunch of excel exports from the front end reporting tooling and manually copied them somewhere which is what actually happened in reality.

Feisty-Cadaver posted:

a long time ago in old job we upgraded from sybase 11 to version 12 l think which is when they re-wrote the query planner

we were p aware on how to structure data and have queries that were sub-second response times 99% of the time but after the upgrade there were one or two that went totally pear shaped

thankfully there was a "don't do that" syntax that reverted those queries to the v11 query planner which fit the bill until I left for a better job

yeah this exact thing happened at my old job

whereas I, by dint of having a much much smaller DB with performance tolerance of "see if anyone notices in the frontend" just yolo'd mssql compatibility mode from 2008 to 2016 and it was fine

Pendragon
Jun 18, 2003

HE'S WATCHING YOU

PIZZA.BAT posted:

fair enough but the entire point of nosql systems is that your queries should be pretty drat simple. if you find you regularly need sophisticated queries then you probably screwed up your model or as you said someone changed their mind

also there’s nosql systems nowadays with query planners & optimizers but they aren’t going to be nearly as sophisticated as sql ones because they don’t need to be

the one time I dealt with a nosql database (Dynamo) the app developers also put the data in an Elastic DB because Dynamo wouldn't let them do the queries they needed to do. that had no ramifications in the future when the two data sources diverged and queries didn't return the right data.

you might be wondering "if the queries needed to be that complex, why were they in nosql?" and I would answer "because the designer/architect/CTO was a total idiot when it came to application design and cared more about buzzwords and w≋e≋b s≋c≋a≋l≋e than making a working product."

which really underlies my issue with nosql: its queries are supposed to remain simple and the model shouldn't change, but all non-failed projects I've seen always get more complex as time goes on, and the initial assumptions made at design time will no longer apply, so how can nosql work in the long run except in extremely limited circumstances?

PIZZA.BAT
Nov 12, 2016


:cheers:


it depends? if it's the data model that's getting more complicated that's usually fine because you can just keep heaping more attributes into your documents with a pretty negligible hit on performance. if the access pattern is what's massively changing then stakeholders need to know that there's going to be some pain in the transition. it's not impossible

Powerful Two-Hander
Mar 10, 2004

Mods please change my name to "Tooter Skeleton" TIA.


this is why in a conversation recently when the other guy said "well we're representing actual documents here so they should be stored in a document database" and I said "yeah except that the model of a given document type evolves over time and changes can have retrospective effect" he went quiet

Captain Foo
May 11, 2004

we vibin'
we slidin'
we breathin'
we dyin'

cosmosdb y/n

Asymmetric POSTer
Aug 17, 2005

we don’t support cosby in the pos anymore

animist
Aug 28, 2018
recently started working on a custom relational db at current job. It has:
- built in webass runtime
- multiple built in orms that you have to use
- single version concurrency control (global lock on everything)
- partial SQL support

i am having a grand old time

hbag
Feb 13, 2021

i had a class on databases and i forgot everything the second i handed in my exam so now every database i make is a single table

which is funny because i actually did really well on the exam

redleader
Aug 18, 2005

Engage according to operational parameters

hbag posted:

i had a class on databases and i forgot everything the second i handed in my exam so now every database i make is a single table

which is funny because i actually did really well on the exam

ah, a nosql user is born

fart simpson
Jul 2, 2005

DEATH TO AMERICA
:xickos:

data based on what?

Ocean of Milk
Jun 25, 2018

oh yeah
I don't even know what a document is

DELETE CASCADE
Oct 25, 2017

i haven't washed my penis since i jerked it to a phtotograph of george w. bush in 2003
a miserable little pile of tokens

Adbot
ADBOT LOVES YOU

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome

Ocean of Milk posted:

I don't even know what a document is

its a portmanteu of 'doctrine argument'

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