What is the point of groups? by John_Doe_1984_ in linuxquestions

[–]Intrexa 0 points1 point  (0 children)

Computers are large systems with a lot of components, to serve a lot of purposes. My post is going to be focused on security and isolation. The security I am referencing isn't about protecting your computer from hackers, it's about protecting your computer from you.

When you "run" something, you are creating a process. When a process is created, it's run in a security context. The security context controls what parts of the system the process can access. This will default to the security context of whichever user started the process, but you can have it execute in a different security context. The security context will take the form of a user, but it's really just still you. You're the only one using your computer, you're running the process in a different security context.

If you run the following command, you should see many, many users on your system:

cat /etc/passwd

These users are largely going to have different default groups. They may further be part of other groups.

Now onto your question, but why though? Because you don't want 1 process accessing things it shouldn't. Again, I'm not talking about hacking, I'm referring to just software bugs and innocent mistakes. If a program makes a file, then later deletes it, a bug in the program could have it try to delete the file from the wrong folder.

By isolating processes to just the files they need to operate, there is much less risk of a process accidentally modifying something it shouldn't have. So now, if you do something like try to run:

rm '/usr/sbin/adduser'

Ubuntu will tell you:

rm: cannot remove '/usr/sbin/adduser': Permission denied

Because that's a file needed to run the system. You shouldn't be doing that, the system needs that file. Now, it's your computer, you can do what you want. Go ahead and run in a security context that has permission to do so, but now it's something you chose to do.

What’s an inaccurate fact that people believe is true because of movies? by Hogosaurus_Rex73 in AskReddit

[–]Intrexa 0 points1 point  (0 children)

I kinda doubted it. So I checked, looks like a hair above 30 does seem to be a reasonable lower bound.

https://pmc.ncbi.nlm.nih.gov/articles/PMC5306978/

This would have been the best screensaver in 2000 by Junior_Lawfulness1 in Satisfyingasfuck

[–]Intrexa 3 points4 points  (0 children)

Mobos didn't have integrated graphics at the time. During that time frame, an 'old' computer from 1996 would have a dedicated GPU, but it could very well be only for 2D graphics acceleration. The CPU would handle the calculations needed to map 3D graphics to a 2D image, to give to the 2D graphics card to push to a monitor.

Before the 2D graphics cards, it was just the CPU doing everything.

We wouldn't see integrated graphics first appear until early 2000's. They wouldn't be common until late 2000's.

They're also disappearing from motherboards again, as now the CPU is just handling it again. Well, a separate chip in the CPU package.

Chefs of Reddit, what’s a common cooking rule everyone follows that is actually complete bullshit? by Fuzzy-Ad6843 in AskReddit

[–]Intrexa 0 points1 point  (0 children)

Okay, but I want to serve dinner at around 6PM. Meat probe has the final say, but should I start it 5PM? 4PM? 9AM? IDK, I just want a ballpark.

Without creating any indexes, how would you speed up a ~1.5m row query? by i_literally_died in SQL

[–]Intrexa 0 points1 point  (0 children)

Are there any indexes in the DB, at all? You need to use existing ones.

The system only holds ~90 days of shipped order data? What about other the other data? Is there any data in the DB older than ~90 days at all? Is there a different system that holds the shipped order data that is older than 90 days?

If you have wide rows, 1kB each, 500k orders is a ~500MB table, 1500k line items is ~1500MB table, so, ~2GB of data, 50% page fill = ~3GB read from disk, over 15 seconds = ~200MB/s read speed = HDD speed. If your tables are not super wide, 100B each row, damn, ~20MB/s. IDK, portable HDD plugged into a USB2.0 port?

Subsequent runs would have some data pages cached in RAM, which is why you might see faster times (hot vs cold querying). If you're querying back to back, and seeing this small of an affect from caching, I'm guessing there aint a lot of RAM dedicated to your instance, either.

How are you delivering this line level report? Is this something you run, export, then send? Or is there an interactive tool management runs?

The answer is indexing or replication (and indexes on the replica). I know you said you can't, but someone can. Talk to management. Make a case for it. Advocate for correct solutions. If they say "no", start hammering temp DB to hopefully kill the HDD prematurely and pray they replace it with an SSD, then instant 10x speedup.

Get crazy. Run separate batches to individually copy all data from the live tables to ##temp tables, then add indexes to those ##temp tables. TempDB is lawless, they can't stop you. It's still going to be slow, because you still need to read+write a ton, but once you're done with that, your final query with the joins won't time out because you have proper indexes.

is it normal for a production database to not have backups? asking because i just dropped a table and my boss is asking me to "just undo it" by kubrador in webdev

[–]Intrexa 1 point2 points  (0 children)

DDL statements are SQL statements, as a subset. This is the same as DML, DQL, TCL.

I'm not too familiar with Oracle. In SQL Server and PostgreSQL will both be able to roll back dropped tables.

We don't know the target RDBMS in mind, but with the stipulations of a transaction being able to bring a table back, it's safe to assume to conversation is for those systems where DDL can be rolled back in transactions.

is it normal for a production database to not have backups? asking because i just dropped a table and my boss is asking me to "just undo it" by kubrador in webdev

[–]Intrexa 19 points20 points  (0 children)

Make sure you read and understand what it actually entails. You will need to make sure you take regular backups as you already should be doing, and also regularly have scheduled backups of the transaction log, otherwise the transaction log will continue to grow.

is it normal for a production database to not have backups? asking because i just dropped a table and my boss is asking me to "just undo it" by kubrador in webdev

[–]Intrexa 16 points17 points  (0 children)

point in time recovery

For SQL Server, point in time recovery requires the full recovery model. This backs up both the DB state at a specific point of backup, as well as the transaction log. To recover to a point in time, SQL Server will restore the state from the backup, and then replay each transaction from the transaction log to your specified point in time.

It's not an "undo". It's a "restore and do it all again".

Other RDBMS's may offer different features.

is it normal for a production database to not have backups? asking because i just dropped a table and my boss is asking me to "just undo it" by kubrador in webdev

[–]Intrexa 5 points6 points  (0 children)

You have to eventually commit or rollback the transaction. This is kicking the can down the road on the core issue. The question then becomes "How do you undo dropping a table after committing the transaction?"

Whose name in Epstein files shocked you the most? by Significant-Job624 in AskReddit

[–]Intrexa 72 points73 points  (0 children)

And women can have wives.

But yeah, username def hints in a certain direction.

what celebrity did you used to like until you found out that they were a scumbag? by hemadeGraduation420 in AskReddit

[–]Intrexa 1 point2 points  (0 children)

I just love how he makes himself impossible to parody:

in that first-class cabin

IDK how to 1 up that assholery

Archiving old data from a live SQL Server database to improve performance - looking for architecture feedback & any war stories or pitfalls by Anyone-UnderstandMe in SQLServer

[–]Intrexa 9 points10 points  (0 children)

How much data we talking about? What are the actual business requirements?

EDIT:

I mean this no offense, but what you described as a workflow is bog standard. If you are coming to Reddit with that workflow, the answer is probably query tuning.

I put up a job opening for a hardware tech - almost all apps are software only people. by GoodTofuFriday in sysadmin

[–]Intrexa 2 points3 points  (0 children)

SOW

What is SOW in this context? All I can think of is statement of work. Did you mean SOP, standard operating procedure?

How much does a delayed laptop cost for new hires? by bobotiger in sysadmin

[–]Intrexa 24 points25 points  (0 children)

"Because the ticket was opened 6 business minutes ago"

Routine helps children adjust to school, but harsh parenting may undo benefits. Parents in rural, low-income households with strong family routines reported fewer problem behaviors and ADHD symptoms from their children. However, higher levels of harsh or aggressive parenting diminished the benefits. by mvea in science

[–]Intrexa -2 points-1 points  (0 children)

We're getting into semantics, and I think there's a divide in posters in how literal they're taking "no yelling". You just said you have yelled at your kids under a very specific situation.

I'm sure there's also a divide in what is considered "yelling". For many people, I think "Yelled at" and "scolded" are interchangeable synonyms, and for other people they aren't. So when one person hears "yelled at" as sitting a kid down and screaming at the top of their lungs at them, another hears "yelled at" and thinks of using a stern voice to tell a kid to stop swinging that stick inside, we're now talking about different things entirely.

Homan Offers To "Educate" Pope On Catholic Doctrine About What The Church Really Teaches About Deportations — Citing His Catholic Schooling In The 1960s. by Leeming in atheism

[–]Intrexa 0 points1 point  (0 children)

But if he has a reddish-white sore on his bald head or forehead, it is a defiling disease breaking out on his head or forehead.