105000+ entries in 0.415s

phf: i
treat
the exercise as a chinese room wired
to explosives. making a mistake elevates danger level, passage of
time elevates danger level,
there's a random factor when it's going
to blow anyway, etc.
mircea_popescu: no, by all means, i like watching
the "alf encounters
technology" hour :D
phf: but
there's only so few rabbis i can pull out of a hat
phf: perhaps
try select * from moduli left outer join (select distinct unnest(mods) as mod from factors) as foo on moduli.idx = foo.mod where foo.mod is null
phf: asciilifeform: is
the original query faster
than
the most last rewrite? asking for personal enlightenment
mircea_popescu: just don't expect any backing
to it for recursive elegance. it dun have what with.
trinque: you came in asking for help with
the one you already stuck dick in.
trinque: nobody's here
to defend sql
to you, fucks sake
mircea_popescu: asciilifeform, dude. it's a
tool. like a steamroller. it does
the following
thing well : if you have cans, it makes
them flat.
mircea_popescu: the only way out is if he ever gives up
trying
to ask sql for lisp support and instead writes his python around
the sql like god meant it.
phf: you can keep from writing
to disk by doing a materialized view. do a materialized view for your
temp query, and
then run second query against it.
that would be my last resort
though
trinque: I'm backing away. asking us
to optimize a query in isolation for you without
the explain and knowing nothing of your schema is ridiculous
mircea_popescu: asciilifeform, " select * from moduli where idx not in (select distinct unnest(mods) from factors)" << 1.make a new
table ; 2.run "select distinct unnest(mods) from factors" and dump
the result into
this new
table ; 3. index it by idx ; 4. run your select as an outer join between moduli and
the new
table.
phf: asciilifeform: oh
there's a
type
mircea_popescu: phf, possibly, i'm not really
THAT close
to
the core of
that beast.
phf: mircea_popescu: i'm not sure
that
the problem is
the recalculate, i
think
the problem is actually not in in combination with
temp calculate
trinque: lol yes,
that's what star means
mircea_popescu: that's
the only available juice
to squeeze
there, communicate
to
the engine
that your db is slow,
the
tmp doesn't move. and you do
this by not making it a
tmp.
trinque: asciilifeform: what are
the cols
there
that you want
mircea_popescu: phf, i expect it'll still re-calc
the
temp on every pass.
phf: mircea_popescu: maybe
try
this with foo as (select distinct unnest(mods) as mod from factors) select * from moduli left outer join foo on module.idx = foo.mod where foo.mod is null;
trinque: asciilifeform: what's
the shape of *
mircea_popescu: a db is a good
tool for pre-given solutions for some kinds of problems. it is not a
tool for implementing arbitrary expressivity.
mircea_popescu: yes dood,
that's why i said what i said re your way of
thinking.
mircea_popescu: but instead actually build
the
table you're
trying
to not-in, and do a join operation.
mircea_popescu: no,
that was his previous suggestion. what i mean by ACTUAL is
that you don't use
tmp
trinque: except operator might be faster
than "not in"
phf: asciilifeform: other option is
to do a left outer join, and
then filter by nulls, but i'm
trying
to recreate
the exercise at home so
that we're not doing
tedious roundtrip
through irc
mircea_popescu: but anyway. if your proggy includes a db you will have
to ~DESIGN~ for
the db.
mircea_popescu: incidentally,
the inept way in which postgress handles
this case is why mysql still official db for mp-wp
mircea_popescu: you will soon discover your heavily recursive way of
thinking is deeply inadequate for
the strengths and useful work of a db ; which may explain why you've not been looking into
them
to
this advanced age.
mircea_popescu: asciilifeform, build
the actual
table and do a join
then.
phf: oh i suppose with
tmp as (select distinct unnest(mods) as mods from factors) select * from moduli where idx not in (select mods from
tmp);
phf: with
tmp as (select distinct unnest(mods) from factors) select * from moduli where idx not in
tmp;
BingoBoingo wonders what gabriel_laddel is up
to, and how
the foot is.
mircea_popescu: (as "that length of knife blade
that hurts but doesn't seriously injure, obtained by holding
the instrument a certain way so
the
thumb covers
the blade". PRISON SLANG!)
mircea_popescu: BingoBoingo, amusingly, no further
than
today walking
through
town i was explaining
to girl
the source and meaning of pulgada
mircea_popescu: extant item slated for replacement anyways, hence all
the protocol
talk.
mircea_popescu: basically acquisition order would switch from "send plane
ticket"
to "send plane
ticket + gpgstation".
mircea_popescu: atm i'm not really doing
that ; but for more respectable cut of girlmeat
there's ye olde ibms.
mircea_popescu: i'd buy some, give
the visiting sluts. sorta like
the
titbits
thing.
a111: Logged on 2018-04-24 23:41 asciilifeform: mircea_popescu, diana_coman , et al, other folx who
travel -- i'd like
to get a picture of whether
there is 'market' in l1/l2 for a pre-engentooated ( laugh at
the laddel-ism, but it promises
to be a somewhat painful process involving crocodile and eeprom writer ) 'c101pa' rockchip lappy .
a111: Logged on 2018-04-24 19:28 phf: diana_coman: is
the protocol
the entirety of documentation for client writers or
there's more stuff in
the pipeline?