mysql – Is a join faster with 5 tables joined together Or 5 separate queries?

I have confusion that I already have in my application 5 tables say a,b,c,d,e and have relationship with each other like a.b_id is primary key of b and chain goes on.

Now my question is that which approach will give me better performance/faster result?
5 queries
Or
A query join with 5 tables?

Thank you.

google sheets – How do I convert rows with 45 columns into 15 separate rows, each with 3 columns?

I am working with a google sheet that gets data from an email parser. Each time an email comes in, a single row is created, and fills in these columns:

B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, AA, AB, AC, AD, AE, AF, AG, AH, AI, AJ, AK, AL, AM, AN, AO, AP, AQ.

I’d like to have it output as:

B1 | C1 |D1

D1 | E1 |F1
....

AO1|AP1|AQ1

B2 | C2|D2
....

Is this possible?
I’ve tried using this:

=FILTER({Sheet1!B:B,Sheet1!C:C,Sheet1!D:D;Sheet1!E:E,Sheet1!F:F,Sheet1!G:G;Sheet1!H:H,Sheet1!I:I,Sheet1!J:J;Sheet1!K:K,Sheet1!L:L,Sheet1!M:M;Sheet1!N:N,Sheet1!O:O,Sheet1!P:P;Sheet1!Q:Q,Sheet1!R:R,Sheet1!S:S;Sheet1!T:T,Sheet1!U:U,Sheet1!V:V;Sheet1!W:W,Sheet1!X:X,Sheet1!Y:Y;Sheet1!Z:Z,Sheet1!AA:AA,Sheet1!AB:AB;Sheet1!AC:AC,Sheet1!AD:AD,Sheet1!AE:AE;Sheet1!AF:AF,Sheet1!AG:AG,Sheet1!AH:AH;Sheet1!AI:AI,Sheet1!AJ:AJ,Sheet1!AK:AK;Sheet1!AL:AL,Sheet1!AM:AM,Sheet1!AN:AN;Sheet1!AO:AO,Sheet1!AP:AP,Sheet1!AQ:AQ},LEN(Sheet1!A:A,Sheet1!A:A,Sheet1!A:A))

But it was just based on another answer I saw on here, and I am sure that I am not applying the filter(range,len()) part correctly.

dnd 5e – How can I pull off being two separate characters at the beginning of a campaign?

I will be playing a Changeling in an upcoming campaign (homebrew setting). I’m interested in hiding not only my race, but also having one or more “retainers” — alternate identities / personas that my changeling can slip into and out of as needed.

The catch is, I wish to conceal (at least at first) the fact that the PC and the NPC retainers are actually a single entity! The most straightforward way of doing this would seem to be observers seeing “both” characters arrive to the starting town at the same time. I would want this to deceive NPCs and fellow PCs.

What magic / mundane / class features do I need to pull off such a deception at level 1? If not, what’s the earliest level you could realistically pull the wool over NPC eyes, solo? The ruse must be able to confound casual observers, but bonus points if it can stand up to additional scrutiny!

I don’t have a set class for this character, but am leaning towards Bard, Rogue, or Wizard. Since I’m trying to fool the party as well, count on no help from them.

dnd 5e – How can I pull off being two two separate characters at the beginning of a campaign?

I will be playing a Changeling in an upcoming campaign (homebrew setting). I’m interested in hiding not only my race, but also having one or more “retainers” — alternate identities / personas that my changeling can slip into and out of as needed.

The catch is, I wish to conceal (at least at first) the fact that the PC and the NPC retainers are actually a single entity! The most straightforward way of doing this would seem to be observers seeing “both” characters arrive to the starting town at the same time. I would want this to deceive NPCs and fellow PCs.

What magic / mundane / class features do I need to pull off such a deception at level 1? If not, what’s the earliest level you could realistically pull the wool over NPC eyes, solo? The ruse must be able to confound casual observers, but bonus points if it can stand up to additional scrutiny!

I don’t have a set class for this character, but am leaning towards Bard, Rogue, or Wizard. Since I’m trying to fool the party as well, count on no help from them.

cart – Magento2: How to separate quote?

Like, I have 5 items in my Cart.

It means there is 1 row in quote table. Which contains parent ID.

And, 5 rows in quote_item which describe all 5 items.

I want separate 3 items from these 5 in another custom quote and need a separate quote for these 3 items.

Expected result:

I want 2 quotes,

1 have 2 items AND 3 items will assign to the newly created quote.

Help would be appreciated.

configuration – NGINX config 2 domains + sub domains in separate root folders and www to non-www

I’ve tried to create 2 separate NGINX conf files for two domains. Each domain has a test. sub domain and www shall be permanently redirected to now-www for canonical reasons. I get an error in below code.

sudo nginx -t nginx: nginx: (emerg) “server” directive is not allowed here in /etc/nginx/sites-enabled/example.com:19

Here’s my conf file for example.com, the second file for example2 is almost identical.

server {
listen 80;
listen (::):80;
root /var/www/example.com/html;
index index.php index.html index.htm index.nginx-debian.html;
server_name example.com 123.456.7.8;
#location / {
#try_files $uri $uri/ =404;
try_files $uri $uri/ /index.php$is_args$args;
#(For WordPress permalinks)
}
# Redirect all traffic to www to non-www for SEO canonical reasons server
server {
listen 80; server_name www.example.com;
location / { return 301 https://www.example.com/$request_uri; }
location ~ /.well-known/acme-challenge/ { default_type "text/plain";
root /usr/share/nginx/html; allow all; }
}
# Direct all traffic to the  subdomain to a separate folder
server {
listen 80;
listen (::):80;
root /var/www/test/example.com/html;
index index.php index.html index.htm index.nginx-debian.html;
server_name test.example.com;

try_files $uri $uri/ /index.php$is_args$args;
#(For WordPress permalinks)
}
# include /etc/nginx/naxsi.rules
location ~ .php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.4-fpm.sock;
}
location = /favicon.ico { log_not_found off; access_log off; }
location = /robots.txt { log_not_found off; access_log off; allow all; }
location ~* .(css|gif|ico|jpeg|jpg|js|png)$ {
expires max;
#To enable leverage browser caching log_not_found off;
}
}

macbook pro – Is there a separate cable for camera in A1707

Recently I replaced the battery and keyboard in my 15″ MacBook Pro A1707. Unfortunately, right after the built in camera disappeared from the system (System report says there’s no connected camera).

I tried different solutions from the web (resetting SMC, PRAM, killing VDCAssistant process) but none of them helped me. Finally I tried to disassemble my mac again to make sure I don’t have any cables left unconnected – everything seems to be connected properly.

I’m pretty much sure I couldn’t break anything – I unplugged lcd cable right before I started replacement and didn’t touch it till the very end.

But maybe there is another (separate) cable connecting top part with lcd to logic board which I somehow didn’t notice?

error – PHP 7: How to create a separate log file in PHP to log only the order data(Order info retrieved from an Magento Order object)?

I have an application developed to manage the orders, vendors and many more things. The default error_log() functionality has already been in use across the application coded in PHP to log not only the errors but order object data to a file called error_log.txt.

I’m looking for a way to log order-specific data to a separate log file so that this data resides in this file as long as I want it to. Could you please guide me in the right direction to achieve this?

design – Use one table and a “type” column to represent two types of vote_counter or use separate table?

I am building a blog system, the blog can have its comment. And like to provide the upvote/downvote feature for both the blog and comment. Since the vote count number of blog/comment should be persisted, i choose to use MySQL to act as the data store.

It seems that i have two choice, the first one is, use a general table and a type column to represent these two kinds of counter, like:

vote_counter
------------
entity_id   bigint          // the id of blog or comment, depends on the "type" column value
type        tinyint         // for example, 1 for blog and 2 for comment
count       integer

Another option is to use one table for one “voteAble” type, for example:

blog_vote_counter          comment_vote_counter
-----------------          --------------------
blog_id    bigint          comment_id    bigint
count      integer         count         integer

Besides these field, I might also need an extra version column to implement optimistic locking.

I am pretty new to MySQL, and i am desired to know that which kinds of table design should be the better one, there pros and cons, and the reasons.

seo – Can I have separate url in internal navigation of website and Sitemap?

I have not so SEO friendly url structure in my internal navigation of website(some technical challenges) but marked each of the page with SEO friendly canonical(through CMS) and these canonicals are there in sitemap as well

To give an example, from

www.example.com

I go to –

www.example/123

which is marked as canonical of

www.example/friendliness/123

and “www.example/friendliness/123” is there in sitemap as well.

So my question is, Is this sufficient or do I need change internal linking (www.example/123 in above example) as well?

Anyways I have seen people marking url’s as canonical to ignore query parameters so it should behave in the same way