Table scan instead of index seeks happening when where clause filters across multiple tables in join using OR

We have an application generated query using a view that has two tables joined on a LEFT OUTER join. When filtering by fields from just one table (either table) an index seek happens and it’s reasonably fast. When the where clause includes conditions for fields from both tables using an OR the query plan switches to a table scan and doesn’t utilize any of the indexes.

All four fields that are being filtered on are indexed on their respective tables.

Fast query plan where I filter on 3 fields from one table:

Slow query plan where I filter on four fields…three from one table and one from another table:

Ideally I would like to understand why this is happening and how to nudge the query engine to utilize all the indexes.

What are the patterns to spell distribution across classes?


It is obvious that there are patterns to spell distribution across classes.

For instance, typically only druids and rangers have access to nature-themed spells. As another example, healing spells tend toward cleric and away from wizard, if that makes sense.

There are some surprises. For instance, Cure Wounds is available to bard, cleric, druid, paladin, and ranger; whereas Healing Word is available to only bard, cleric, and druid.

Another somewhat surprising example: Find Familiar is only available to wizard. Why is that? Certainly the general tropes of fantasy don’t suggest clerics would have familiars, but what about sorcerers and warlocks?

Clearly there are patterns. In the case of Cure Wounds and Healing Word, the pattern could be that only full casters get to heal at a distance; or, perhaps healing by touch is more thematically appropriate for paladins and rangers.

The Question

Is there any published official material stating, as the title says, What the patterns are to spell distribution across classes?

Failing published official material, is there any published unofficial material on the question, or any third party analysis?

I’m not looking for answers about my specific examples, but about the overall picture.

I’ve looked through the published materials, the internet generally, and particularly here on rpg, and haven’t found anything, but maybe I’m just not looking in the right place.

mapping a digraph across sectors of countries

Given a (9,9) matrix representing three countries (for example, the US, China, Russia), each one of which has three sectors (vertices/sectors {1, 2, 3) for the US; {4, 5, 6} for China; and {7,8,9} for Russia), I like to create a map of the directed linkages between all 9 sectors using the actual world map.

SeedRandom[01]; g={{1.09738, 0.0440055, 0.113012, 0.0436654, 0.0550311, 0.0365684,   0.0990232, 0.0550859, 0.0629618}, {0.0850364, 1.05189, 0.0803699,   0.0999457, 0.0846171, 0.115742, 0.078153, 0.111992,   0.0828957}, {0.0982489, 0.0712597, 1.07401, 0.0723417, 0.0431498,   0.0824737, 0.126777, 0.0569532, 0.0808742}, {0.089248, 0.114673,   0.135009, 1.10033, 0.0743107, 0.107282, 0.133689, 0.0850109,   0.0467125}, {0.0921911, 0.0582554, 0.0937256, 0.0535134, 1.10261,   0.0882558, 0.0366383, 0.154662, 0.0893078}, {0.0835567, 0.0541454,   0.0971447, 0.0458107, 0.132431, 1.08961, 0.0726788, 0.108789,   0.118664}, {0.0747554, 0.150188, 0.139565, 0.0936757, 0.132907,   0.140158, 1.05936, 0.0964287, 0.116732}, {0.0667764, 0.0489254,   0.137437, 0.0962666, 0.0882702, 0.0704283, 0.0807027, 1.05768,   0.101375}, {0.0824603, 0.11258, 0.135069, 0.110204, 0.102288,   0.103722, 0.0453945, 0.0473116, 1.10549}}; n = 9; d = 0.12; G = RandomGraph[{Round[n], Round[n*(n - 1)*d]}, DirectedEdges ->True]; Ga = AdjacencyMatrix[G]*g; sa = SparseArray[Ga]; weightedG =    Graph[sa["NonzeroPositions"], EdgeWeight -> sa["NonzeroValues"],    DirectedEdges -> True, VertexCapacity -> {i_ :> i},    VertexSize -> .3]; SetProperty[weightedG,    VertexLabels -> {i_ :>    Placed[PropertyValue[{weightedG, i}, VertexCapacity], Center]}] 

Split data across multiple rows in a single statement

I have data in table like

Customer Invoice No Date Value Paid Balance
ABC 1 01/12/2020 25 0 25
ABC 2 01/12/2020 50 0 50
XYZ 3 02/12/2020 200 0 200
XYZ 4 04/12/2020 100 0 100
ABC 5 04/12/2020 500 0 500

Now I received amounts for customers as below

ABC 540 XYZ 210

540 210

After receiving the amounts my table should like this

Customer Invoice No Date Value Paid Balance
ABC 1 01/12/2020 25 25 0
ABC 2 01/12/2020 50 50 0
XYZ 3 02/12/2020 200 200 0
XYZ 4 04/12/2020 100 10 90
ABC 5 04/12/2020 500 465 35

I got some clues but this works only for date based values but I need customer and date based.

Any help will be appreciated

When using Magic Jar, what effects follow the user across bodies?

There’s a similar question for 3.5e where the answer is ‘unanswered’, but I’m hoping there’s something in 5e that’s different.

To set an example scene: You’re a Draconic Bloodline Sorcerer with Draconic Resilience. You’re also a Bladesinging Wizard, and you’ve activated Bladesong. You have two attuned items. You’ve cast Haste and Invisibility on yourself. The Bard has given you inspiration. You’ve been frightened by an enemy, but you’ve charmed them back. You proceed to use Magic Jar on a random goblin.

What is carried over? What if you did all that as the goblin, then returned to your own body? Do the effects affect the body, or the ‘soul’?

Sync logins and Agent jobs across all replicas in Distributed Availability Group

I am using dba_CopyLogins stored proc to sync logins on replicas in Distributed Availability group , but the database level permissions are not transferred due to database sync operation is going on.. Is there any way to sync all logins and permissions from global primary to Forwarder and other replicas? also how to copy agent jobs?

facetwp leave all filters active across all pages, archives or single post

I will be quick and precise, I created a real estate site, I used the facetwp solution not very difficult to understand and with a rich documentation and hooks. I think I have everything in front of me but I need some help to understand which one. I’m still learning.

I put the links at the bottom.

the problem I can’t figure out which hook to use to basically tell facetwp to leave all filters active across all pages, archives or single post of properties , ignore post category, taxonomies, not auto-detect filters ,the header filters must remain the same everywhere

I have attached an illustration


How to Customize WordPress Archive Queries

80 hooks available wich one i can use ?

they talk about that too :" Instead of creating an entirely separate query, we recommend using WP’s pre_get_posts filter to modify the existing query."

update 26/10/2020

I updated the image to illustrate the problem.

I still haven’t figured out what to do.. I hope it’s clear and at least someone understands the problem.

enter image description here

How long should it take to travel across Barovia?

I’m running Curse of Strahd for about 5 players. The party is currently level 4 and has managed to travel all the way to Krezk from Barovia after finishing death house, at the behest of Ismark and Ireena.

I estimated travel time based on the map of Barovia provided in the module very roughly. Each hex is supposed to be 1/4 mile, and pg 28 of the module says:

Dangers abound in the land of Barovia. Check for a random encounter after every 30 minutes that the adventurers spend on the roads or in the wilderness. (Don’t check if they have already had two random encounters outdoors in the past 12 hours).

I counted roughly 70 hexes along the road from Barovia to Vallaki. This comes out to 17.5 miles, which could be covered in about 5.8 hours on foot assuming a Normal travel pace of 3 mph. At a fast pace (e.g. you were in a hurry to get the hell out of town because you stole a girl from a vampire) you’d get there in around 4.4 hours.

I went with that for the players, and they had a pretty quiet walk to Vallaki. They ran into

neither of which slowed them down since both encounters were non-combat. Per the book, I didn’t check for any additional encounters.

Anyways, by the time they got around to leaving Vallaki for Krezk the next day, I wasn’t sure if they should have been making such swift progress. I could have had Strahd or some other force arbitrarily waylay them, but I was still getting used to my big boy GM boots and didn’t want to do that. They ended up making it to Krezk that following day, where some fun stuff happened with the Abbott.

I was a little unprepared for them to make such swift progress in a single session and skip over all the hooks in Barovia and Vallaki. I did my best to keep the game going anyways, but I wasn’t sure if I was missing something either implied or outright stated in the module that should make it more difficult to walk across Strahd’s domain. I understand that Strahd himself might have made things more difficult (especially concerning Ireena), but should the overland travel itself be more arduous/take more time, given a party who sticks to traveling during the day?