« first day (2459 days earlier)      last day (2411 days later) » 
00:00 - 14:0014:00 - 00:00

12:47 AM
@KrisGruttemeyer Users are the source of all database problems, so that makes sense
 
1:03 AM
I have no idea why the vendor would be checking the system tables under snapshot isolation though
 
@PaulWhite been trying to figure out what a multi-consumer spool might be, any ideas?
 
1:23 AM
@sp_BlitzErik what do you mean by multi-consumer?
 
that is precisely what i'm trying to figure out
 
any more context that you can share?
my guess would be a spool that's used in multiple places in a plan
easiest demo that comes to mind for me would be GROUP BY GROUPING SETS
 
it's one of the reasons given in the xe session for adaptive joins being skipped
 
oh, you're digging for gold again
 
i have three of them figured out
perhaps a recursive cte
i'll try that next
good idea
 
1:30 AM
that term is mentioned in blogs
 
@sp_BlitzErik Any spool with a primary node ID property
 
oh, I was going to say
I googled and found a Paul White answer with that term
 
@PaulWhite that was my second guess
 
AKA common subexpression spool
 
oh, that's one of the reasons GROUP BY GROUPING SETS sucks so much
forces a serial zone
seemed like it did, but I never had confirmation of that
 
1:34 AM
Another example would be the eager spool after an update in a wide update plan
Segment spool for window functions and multiple distinct aggregates are the other examples you probably already had
 
@PaulWhite that's what I was gonna say
 
Maybe the most common example yes
 
the batch mode window aggregate is kicking my butt
 
how so?
and is it eating your bad SQL for breakfast?
 
1:49 AM
yes
trounced
throttled
mangled
just fyi
2017 showplan schema is up
<xsd:attribute name="ShuffleType" type="xsd:string" use="optional"/>
<xsd:attribute name="ShuffleColumn" type="xsd:string" use="optional"/>
 
2:17 AM
is that a dance?
 
one can only presume
 
 
4 hours later…
6:13 AM

Town Hall Chat #8 - 27 September 2017

12 hours ago, 31 minutes total – 151 messages, 19 users, 43 stars

Bookmarked 11 hours ago by hairboat

 
gbn
6:49 AM
as far as I know, yes, because if can be rolled back
CREATE TABLE dbo.foo (bar int)
SELECT fooid = OBJECT_ID('foo'), barid = OBJECT_ID('bar')
BEGIN TRAN
EXEC sp_rename 'foo', 'bar', 'object'
SELECT fooid = OBJECT_ID('foo'), barid = OBJECT_ID('bar')
ROLLBACK
SELECT fooid = OBJECT_ID('foo'), barid = OBJECT_ID('bar')
The other way to consider it... from the mnirroring page
> Database mirroring involves redoing every insert, update, and delete operation that occurs on the principal database onto the mirror database as quickly as possible. Redoing is accomplished by sending a stream of active transaction log records to the mirror server, which applies log records to the mirror database, in sequence, as quickly as possible.
All these renames etc are simply CRUD on the underlying system tables (exposed through catalogue views)
Which is interesting for TRUNCATE TABLE. You can't truncate a replicated table.
 
7:08 AM
Morning, (4th day w/o smoke)
 
@McNets Congrats! :-)
 
@hot2use Thank you
 
gbn
@McNets good stuff. How are your family and colleagues doing...? :)
 
@gbn Living alone this week
And maybe the next too
 
gbn
Video gaming and pizzas, sitting in your underpants?
 
7:17 AM
No, no, I like cooking, but I'm trying to loose weight too
 
gbn
What I do when Mrs GBN goes away.
"Video games and home cooking, sitting in your underpants?"
@McNets That's quite masochistic
 
I've loosed about 13 Kg last summer
 
gbn
wow. I could do with losing that too
 
It's easy, don't eat nothing !!!!
 
8:07 AM
@McNets You can't trick evolution. While seeming an obvious thing to do I can be counter-productive. Your metabolism goes into hibernate mode and starts reducing its energy consumption. You do lose weight (water and fat), but other functions in the body (e.g. brain) will be in a reduced power mode.
After you have lost weight and start consuming more food, your body will start to store energy for other "hard" times. You gain a lot of weight again, because the body has determined that it might have to go for a longer period of time without having enough food.
The best way to reduce weight is to eat a balanced diet and to increase your energy consumption by exercising more.
P.S. I don't do it myself and have gained some excess weight over the last year, even though I have reduced my energy intake. :-(
 
gbn
8:21 AM
There was an article recently in a UK newspaper that we are way too sedentary. The tl;dr is that even walking 10 mins a day is enough to reduce risks from being a couch potato: don't have to go to the gym or run marathons etc
 
Living in a city I walk everywhere
 
gbn
In Malta, people drive utterly everywhere
 
I park my car on Friday and only take it out again on Monday
 
gbn
150 metres? Drive
 
I usually can't park any closer than I live
 
gbn
8:22 AM
I walk a lot more here (Switzerland) than Malta. I've changed my commute too to add in a full 10 mins walk
 
I would have to drive further away from the shop to find a parking spot :)
 
gbn
trivial, may be, but better then nothing
 
@hot2use I agree with you, but unfortunately tobacco is not the only headache lately
It seems I've decided to change my whole live this current month...
 
@McNets Well then, good luck :-)
 
@hot2use I'll need it, and something else...
 
9:15 AM
morning
questin
I'm currently debugging a plgpsql function
and it gives me this at the end
ERREUR:  structure of query does not match function result type
DETAIL:  Le type timestamp(6) without time zone renvoyé ne correspond pas au type numeric attendu dans la colonne 7.
CONTEXT:  fonction PL/pgsql report.test(timestamp without time zone,timestamp without time zone,integer), ligne 10 à RETURN QUERY
 
9:33 AM
@AndyK you should probably name your columns in your select list instead of select *
 
9:48 AM
@TomV what do you mean?
 
> SELECT * FROM "Movement_over_period";
 
Yeah, there is no way to tell what column from the select is mapped to which column from the returned table
select * is going to give you headaches all the time if you rely on column order and datatype being consistent
 
To elaborate a little more, the order of columns in the result declaration (RETURNS TABLE(...) probably doesn't exactly match the order of columns returned by the SELECT * FROM "Movement_over_period";
 
@AndyK Also - although unrelated to the issue - are you sure you want the bitwise AND operator there?
> WHERE (dw.period_frequency(p_debut::date + n) & frequence != 0)
 
Run the query separately and double check. But as Tom has already said, just get rid of the SELECT * and list all the columns explicitly.
 
10:02 AM
this is what I've done
and it gives me this
ERREUR:  ne peut pas modifier le type de retour d'une fonction existante
DETAIL:  Le type de ligne défini par les paramètres OUT est différent.
HINT:  Utilisez tout d'abord DROP FUNCTION report.test(timestamp without time zone,timestamp without time zone,integer).

********** Erreur **********

ERREUR: ne peut pas modifier le type de retour d'une fonction existante
État SQL :42P13
Détail :Le type de ligne défini par les paramètres OUT est différent.
Astuce : Utilisez tout d'abord DROP FUNCTION report.test(timestamp without time zone,timestamp without time zone,integer).
@ypercubeᵀᴹ legacy code
tbh, I'm not even why she wrote it that way
no unit testing, no doc
the person who wrote that has left a while ago
 
Does it say you can't modify the return type of an existing function? (and that you need to DROP it first)
 
@AndyK It says you need to drop the function and recreate it - assuming I understand the French ;)
 
things you regret asking at 6am: dba.stackexchange.com/questions/187139/…
 
> Also, CREATE OR REPLACE FUNCTION will not let you change the return type of an existing function. To do that, you must drop and recreate the function.
From: https://www.postgresql.org/docs/current/static/sql-createfunction.html
 
I know you're not doing a full backup. I'm asking why you're not, since that would backup literally (in the most literal sense of the word) all of the things that you want to backup. — sp_BlitzErik 2 mins ago
 
10:09 AM
@sp_BlitzErik Seems v similar to dba.stackexchange.com/q/187107/1192?
 
I wouldn't be so literal
 
@ypercubeᵀᴹ I dropped the function
 
sepupic strikes again
 
that's the issue @ypercubeᵀᴹ
 
@sp_BlitzErik hm
 
10:10 AM
@AndyK Are you sure? That's not what the message says
 
@ypercubeᵀᴹ it worked. you're the saviour
pffiou
 
SaviourCubeᵀᴹ
3
 
@PaulWhite hm indeed
 
@PaulWhite that reminds me of the Dali painting
 
@PaulWhite +1
 
10:14 AM
Crucifixion (Corpus Hypercubus) is a 1954 oil-on-canvas painting by Salvador Dalí. A nontraditional, surrealist portrayal of the Crucifixion of Jesus, it depicts Christ on the polyhedron net of a tesseract (hypercube). It is one of his best known paintings from the later period of his career. == Background == Dalí's inspiration for Corpus Hypercubus came from his change in artistic style during the 1940s and 1950s. Around that time, his interest in traditional surrealism diminished and he became fascinated with nuclear science, feeling that "thenceforth, the atom was [his] favorite food for thought...
 
@ypercubeᵀᴹ thanks
 
@PaulWhite @sp_BlitzErik I think the problem with that answer has to do (at least partly) with the wording of the question.
I would think the OP wants to create copies of existing tables in the same database. For which sepupic's suggestion would seem fine to me
 
@PaulWhite It's nice that I take all the credit (and @sp_BlitzErik, @TomV and @AndriyM are ignored).
 
Yes I thought that was nice too.
 
@AndriyM feel free to comment -- i vtc as too localized
@ypercubeᵀᴹ i did nothing!
 
10:27 AM
38 mins ago, by sp_BlitzErik
> SELECT * FROM "Movement_over_period";
 
@sp_BlitzErik I'll probably do when I'm back from lunch
 
@ypercubeᵀᴹ meh. any old fool can copy and paste.
 
sorry guys
panic mode
cheers @sp_BlitzErik, @AndriyM & @PaulWhite
I hate legacy code
 
I'm starting to think you don't like me
 
10:43 AM
Update: appear to have infection in my ear and face. Antibiotics and overnight monitoring required.
 
EAR AND FACE
 
To restore the 18:00 log backup, you would need the VSS Snap, and the 17:00 log backup. "data since the last ... full backup" is the behavior of a differential backup, not a transaction log backup. — sp_BlitzErik 42 mins ago
@sp_BlitzErik Are you suggesting the non-snapshot full backup could not be used?
As I read the question, that is what he is asking: Does the snapshot break the recovery chain starting with the non-snapshot full backup.
 
it looks like it does to me -- if the vss snap isn't dirty, it'll reset the doodads
like this this great post, brent
 
"tool used non copy_only backups, thus destroying the log chain" A Full backup never breaks the log chain. A non-copy-only full just resets the differential base. — David Browne - Microsoft 19 hours ago
 
oh, i see what you're saying now
yeah, he can use the other full backup and logs, too
 
10:55 AM
Good because I really didn't fancy explaining it.
I think you should turn your comment into an answer and explain that bit.
Goodness knows the long comment chains on his previous questions haven't helped him.
But seriously, if only for his own sanity, he needs to test the exact scenario for real.
The only downside I can see would be the VSS snapshot resetting his differential base, but there are no differentials AFAICS.
 
yeah, i will
i have a demo written basically
 
Cool.
 
11:13 AM
answered
0
A: Is my restore process being badly affected by this third-party non copy-only backup?

sp_BlitzErikMaybe this will help you understand. Let's do a demo! We'll make a dummy database with some dummy data. USE master; /*Create a dummy database*/ CREATE DATABASE LogRestoreTest /*We full now*/ ALTER DATABASE LogRestoreTest SET RECOVERY FULL /*Context is everything*/ USE LogRestoreTest /*If not...

 
I'd up-vote but I don't want to trigger shog's bot
 
ooh, robots
here's a better question
 
@sp_BlitzErik agree
 
do you want to trigger my robot?
@hot2use :)
 
DON'T TOUCH any of those schemas and columns. The latter you cannot even possibly drop as they belong to each table. Also, apparently you are not on a vanilla PostgreSQL but maybe something else. Finally, please show the exact command and the error message and what @hot2use mentions. — dezso 35 secs ago
@hot2use ^^
 
11:19 AM
@PaulWhite do you still have that quick example of no perf spool hint doing something?
 
@sp_BlitzErik He's mixing information into what he believes is fact.
 
he's been chasing this dog for song long i can't believe he just never bothered to test anything
 
All the information I quoted is from the official documentation, but he doesn't understand the concept of the copy_only option/flag.
In his first question he was performing copy_only backups in addition to the snapshot + copy_only backups of the 3rd-party vendor.
I'll have another crack at it again later. Gotta run.... meeting.
 
that's... astounding
 
@dezso lovely
@sp_BlitzErik you mean shog's?
 
11:28 AM
i mean the very robot what sits on my shoulder waiting for judgment day
 
@sp_BlitzErik Not open on my desktop right now. I'll have a window in a few moments. Tell me what you need.
 
@PaulWhite any query where the no perf spool hint actually removes the spool
also thanks
hugs, etc.
 
@hot2use His next question will feature multiple concurrent partial file backups.
To be fair, some of this backup/restore stuff can be confusing, and the documentation is not always a model of clarity.
 
@PaulWhite nevermind, figured it out
you can still have the hugs, etc. though
 
@sp_BlitzErik Are you sure? It's no hassle to rustle something up. The hint should work in most cases where there's a sort/spool combo.
 
11:32 AM
i mean, if you want
who can say no to you?
 
My wife seems to have it down
BTW I added a CW answer from David's comments on the previous question. They essentially addressed the question, but did not belong in comments.
 
i saw
 
@sp_BlitzErik Here you go:
CREATE TABLE dbo.Example
    (col1 nvarchar(100) NOT NULL);
GO
-- 50 rows with value '1'
INSERT dbo.Example (col1)
SELECT TOP (50)
    N'<x>1</x>'
FROM sys.columns AS C;
GO
UPDATE STATISTICS dbo.Example;
GO
SELECT DISTINCT
    CONVERT(xml, E.col1).value('(x/text())[1]', 'integer')
FROM dbo.Example AS E;
GO
SELECT DISTINCT
    CONVERT(xml, E.col1).value('(x/text())[1]', 'integer')
FROM dbo.Example AS E
OPTION (NO_PERFORMANCE_SPOOL);
Just to add one where there's no sort but the spool is still a perf spool, albeit an index spool.
 
ah, xml
you horror show
i had one with a dumb range join
 
MikaelEriksson was involved, what can I say.
 
11:38 AM
i can get all of these non adaptive join reasons except the interesting ones
eajsrExchangeTypeNotSupported
eajsrMultiConsumerSpool
 
Adaptive join is dead to me.
 
you're dead wrong (biggie voice)
 
Enterprise only. I mean really.
Stick an OPTION (RECOMPILE) on it and be done with it.
 
i mean, hey, you can have TWENTY FOUR CORES for standard edition
why not spend 48k on recompile hints?
> mfw
 
Ah well you see that's not a performance spool.
 
11:45 AM
i guess i have a drastically wrong idea of what that is then
 
There are several different ways a spool can be introduced. It's confusing and misleading, but there we are.
NO_PERFORMANCE_SPOOL is basically the respectable face of trace flag 8690.
 
is a perf spool only a lazy spool then?
yeah, i'm aware of that tf
 
It's a spool introduced for a specific reason, and given it's own name. Of course all spools are performance spools, in that they wouldn't be there if they didn't result in a lower cost estimation, but not all spools are performance spools.
There, clear as glass.
Truly sorry.
@sp_BlitzErik As a practical matter, it would be best to refer to a performance spool as an explicit Sort + Lazy Table Spool combination.
The example I gave you is actually a bit misleading, so sorry about that.
 
12:04 PM
it's too late, i'm crying
 
Luckily I know you are resilient and will soon recover.
 
holy cow, the xml thing worked, but not for the reason i wanted it to
i also had to force the plan parallel, but hey
 
Answering questions before you ask them is always the most efficient way to go
eajsrExchangeTypeNotSupported?
 
YES
@PaulWhite ignore that comment flag
 
12:19 PM
Okidoki
 
@TomV and special kudos to @TomV !
@ypercubeᵀᴹ my gf said it was an interesting piece of art
 
Just working through this. I get the error after the first restore when I attempt to select from t1: Database 'LogRestoreTest' cannot be opened. It is in the middle of a restore.EvilDr 2 mins ago
HOLD MY WIG
 
did you change something?
 
@sp_BlitzErik yes, the data
 
12:27 PM
@sp_BlitzErik in some dimension
 
@ypercubeᵀᴹ cool, i'm running on like no sleep so just lemme know what i should be looking at
 
the data
 
@ypercubeᵀᴹ By the way, USE tempdb is unnecessary, even if you put a semicolon at the end, because the table is created in tempdb anyway.
 
there, I'm helping
 
@AndriyM i start all my scripts with that for questions here in case the example data uses real tables
 
12:28 PM
I change Betty (from dept 4 to 7) and Gregory to have the highest date (same as Faith, dept 1) .
So departments 4 and 7 have a single employee each, and they don't appear in the results.
Anyway, I think that you could replace the < with <= and they would appear again
 
@sp_BlitzErik Ah, it was your script, sorry, I was unaware
 
answer deleted. not worth the aggravation.
 
Oh, so that's why I couldn't find which question it was about...
 
Which question was it?
 
12:32 PM
Thank you
You did it again
 
I like your answer, @sp_BlitzErik.
 
@ypercubeᵀᴹ Oh thanks. I was worried it was the restore one.
 
(the saving thing)
 
The other answer is just code
 
2 hours ago, by Paul White
SaviourCubeᵀᴹ
 
12:36 PM
it's all too much~
 
sob
@ypercubeᵀᴹ Steal it and repost it.
 
yeah, then op can ask you what happens if he adds a pk :)
 
I can't believe we've made you cry twice in half an hour.
Clearly we are bad people
 
river of tears this AM
 
@AndriyM 2 seconds too slow again
 
12:40 PM
Need more practice.
 
Heh
 
@PaulWhite from SaviourCube to BadCube? Nah
I'll do something better. Vote to undelete the answer ;)
 
The broken shift key in the question is irking me.
 
@ypercubeᵀᴹ D:
 
Hm. It's a pretty terrible question.
 
12:49 PM
This result is baffling. Three employees with the same latest hiredate, but only 2 appear in the result:
http://dbfiddle.uk/?rdbms=sqlserver_2016&fiddle=45f149defb14f858b89530598ce931b6
@PaulWhite and yet, only 1 close vote.
 
@ypercubeᵀᴹ Puzzling.
 
@ypercubeᵀᴹ I think I'm not getting something...I mean, the query shows one employee with the most recent hire date per some other employee in the same department. In theory, it could always choose the same one
or two...or three
it's because the ORDER BY is just using the hiredate column. If I add, for instance, NEWID() there, the result changes for me
 
@Lamak I was referring to the lack of close votes being puzzling.
 
it's got one more now. :-)
 
Welcome back Max.
 
12:57 PM
@PaulWhite ah, yeah. I was supposed to reply to @ypercubeᵀᴹ
 
Fixed
 
@PaulWhite thanks
 
@PaulWhite thanks
 
@Lamak exactly. So what is troubling you?
 
@ypercubeᵀᴹ don't know. I guess I misunderstood your comment
in particular:
> This result is baffling
 
1:00 PM
Yeah, "baffling" was not the right word but I couldn't find anything better at the moment
 
@ypercubeᵀᴹ @ConfusingCubeᵀᴹ
 
@ypercubeᵀᴹ Which part do you find "baffling"? The choice of the top 1 is non-deterministic.
Have fun with dbfiddle.uk/…
@Lamak That chooses the same one ^
 
@PaulWhite awesome!
 
@PaulWhite nice
 
1:26 PM
@PaulWhite Snapshot isolation plus ALTER ROLE ... ADD MEMBER = SQL server poops it pants. And so does the replicator. The company is investigating why that is needed and going to provide us a new build that has that isolation level toggle-able
 
wait... rcsi or just si?
 
can't you just not request that isolation level when you run commands like that?
 
We confirmed that is was using it by hitting dm_exec_sessions where transaction_isolation_level=5
 
1:28 PM
@sp_BlitzErik It's a third party application and that's what they are doing
 
i understand, but like... you have to ask for snapshot isolation, either when you start the query or in connection pool settings
 
I've recreated my function with an INNER JOIN and now it is showing results...
OMFG
 
@sp_BlitzErik Yes, it's baked into their 'Replication Agent' that requests that specifically.
It's all voodoo anyways. All replication is.
 
good lord
 
@sp_BlitzErik I was thinking of some other colorful metaphors but good lord will suffice.
bi-directional replication b/w SQL server and AS400.
 
@KrisGruttemeyer I'm not certain what you're saying here. It seems to be possible to add a user to a role inside an SI transaction. Are you saying doing that breaks their schema-change monitoring script?
 
if it is too violent, I will delete it
 
@AndyK See that guy hanging upside down? That's me when the replicators dies
 
@KrisGruttemeyer tell me about it
 
gbn
Anyone familiar with the IBM "party model"? A friend just pinged me, new data architect says they need to re-write their entire DB into this because the current model "is not industry standard"
 
1:35 PM
@PaulWhite So the mechanism for the replicator that determines changes (It uses Change Tracking on a CDC table (The actual _CT table --Don't get me started). Since the _CT table is in a system schema, it isn't versioned. So when it forces the SNAPSHOT ISOLATION level and we add a DDL change, like adding user permissions, it pukes all over the place.
 
Far out.
Way far out.
 
It's why I drink....
Well, not the only reason why but mostly
 
gbn
At my last place, replication was one of the biggest pains in the arse
 
@KrisGruttemeyer Honestly it takes a lot to raise my eyebrows, but that astonished me
 
@PaulWhite Anything I can do to help. :D
@gbn It's just insane, especially since it's bi-di between an iSeries....
 
1:37 PM
People can be so amazingly ... creative
 
It's extremely sensitive
 
No doubt!
 
@sp_BlitzErik what I like is that even QUERYRULEOFF BuildSpool still allows some spools to show up
could "eajsrExchangeTypeNotSupported" just be if the operator runs in row mode?
 
@JoeObbish didn't you have some wacky no perf spool example too?
 
yes
 
gbn
1:39 PM
@KrisGruttemeyer I always think that when "custom" solution to built-in features happen, the wheel gets reinvented square
 
for a little extra spice, because the iSeries schema and SQL schema are different (we are doing this to transition off of the AS400 next year) we had to build an ETL process in SSIS that runs constantly and consumes traffic from the 400 and translates it into SQL.
 
gbn
@KrisGruttemeyer Probably better than replication
 
@KrisGruttemeyer you need to find a way to make @PaulWhite eyebrows back to their place
 
@gbn Well the replication feeds the ETL
 
@Lamak They're in low-earth orbit right now
 
1:40 PM
@gbn @MDCCL might know about it.
 
The data flow diagram would make you cry.
 
@JoeObbish yeh there's a whole nested loops -> repartition in row -> nested loops -> gather in row thing going on
 
2 hours ago, by Paul White
Adaptive join is dead to me.
 
YOUR A DEAD MAN [sic]
the trick seems to be to try to force a parallel plan where it can't happen
then errythang goes blooey
 
gbn
@KrisGruttemeyer oh. May I ask why or too long? Or don't have the time or the crayons to explain it to me
 
1:42 PM
well, that's NOT what I would have expected
 
I think they're just looking for excuses to add extended events now
 
I can do a quick attempt at getting eajsrMultiConsumerSpool if that would help
 
sure
 
@gbn, I've seen the term in some answers in the site and usually it was a question about users/groups/roles, resources/items and privileges. I think the party model is more general, something like a pattern, similar to EAV but for tables and relationships.
 
i've tried recursive ctes, grouping sets, rollup, cube, pivot, unpivot
weird stuff with top
 
gbn
1:43 PM
@ypercubeᵀᴹ My first impression when I googled it. I suspect it's over engineered for what they actually need
 
@gbn TL;DR - AS400 replicates to staging DB on SQL (using the third-party app). Those tables have CDC on them. Our SSIS packages runs every second, picking up what new changes need to be processed (using LSNs) and processes them into the app DB.
 
all sorts of windowing functions that went batch mode and didn't spool properly
 
oh, I don't have 2017 here
 
@gbn Also, fun fact, CDC is not synchronous so we had to tune the maxscans/maxtrans and interval setting for CDC so it scans faster
 
guess I'm not helping
 
1:45 PM
wanna shoot me whatever your spool query is?
 
@sp_BlitzErik that's a long list
@sp_BlitzErik I would, but I'm not sure what you're referencing
I do dumb stuff with spools all the time
 
yeah, it's why i'm running on about four hours of sleep and probably have food on my glasses
 
@KrisGruttemeyer Quite an achievement that it works at all
 
pick a common subexpression spool, any common subexpression spool
 
is it easy to send me the plan for your grouping sets query?
 
1:46 PM
@PaulWhite And the same has to happen in reverse from SQL to the AS400. I cannot wait to be off the iSeries for the simple fact that I won't have to deal with this process any longer
But it does work. If the replicator stays up, we can make the entire round trip in about 5 seconds.
 
then we have safeties to prevent record from going into an infinite loop
I should do a blog on it....
 
@JoeObbish i deleted it a while back. it didn't spool, it did some aggs and then concatenated.
 
@KrisGruttemeyer People do enjoy reading that sort of thing.
 
how many distinct aggregates did you have?
 
1:49 PM
i tried two in various stages
lemme try to rewrite it quick
 
oh, you might have already done my idea then
it's possible to get a plan with joins for each of the grouping sets branches
it's pretty much the worst thing ever
easiest way to trigger it is with 2 distinct aggregates
maybe those joins aren't eligible for adaptive joins?
it's joining the spool to itself
 
gbn
@ypercubeᵀᴹ thanks, will pass it on
 
don't get mad at the picture -- paste the plan doesn't work with 2017 just yet
 
I didn't even know that you could do SUM(Distinct)
maybe try COUNT(DISTINCT) on 2 columns that you aren't grouping by?
 
00:00 - 14:0014:00 - 00:00

« first day (2459 days earlier)      last day (2411 days later) »