My unpopular opinion
In a startup, hackathon, or whatever, if you have to think about how your product is unique, it's not unique at all.
@codeandthought
In a startup, hackathon, or whatever, if you have to think about how your product is unique, it's not unique at all.
@codeandthought
๐ค10๐ฏ1
3 Ways to Insert Data into PostgreSQL: Sequential, Batch, and COPY
Imagine inserting 1 million rows into your database. You have three strategies:
1. Sequential INSERT: One row at a time
Executes a separate INSERT for each row.
Simple, but slow due to repeated database communication.
2. Batch INSERT: Multiple rows at once
Groups many rows into a single INSERT statement.
1M rows with batches of 1,000 = 1,000 INSERT statements.
Faster because it reduces database round trips and statement overhead.
3. COPY: Bulk data loading
PostgreSQL's optimized mechanism for loading large datasets.
Streams data directly into the database without individual INSERT statements.
Usually the fastest option for massive data ingestion.
One important distinction: server-side
How do we compare them?
Measure their throughput:
Throughput = Total rows inserted / Time (seconds)
@codeandthought
Imagine inserting 1 million rows into your database. You have three strategies:
1. Sequential INSERT: One row at a time
Executes a separate INSERT for each row.
Simple, but slow due to repeated database communication.
2. Batch INSERT: Multiple rows at once
Groups many rows into a single INSERT statement.
1M rows with batches of 1,000 = 1,000 INSERT statements.
Faster because it reduces database round trips and statement overhead.
3. COPY: Bulk data loading
PostgreSQL's optimized mechanism for loading large datasets.
Streams data directly into the database without individual INSERT statements.
Usually the fastest option for massive data ingestion.
One important distinction: server-side
COPY FROM reads a file accessible to the PostgreSQL server. \copy in psql reads a client-side file, and COPY FROM STDIN lets applications stream data.How do we compare them?
Measure their throughput:
Throughput = Total rows inserted / Time (seconds)
@codeandthought
๐ฑ1
Have you ever checked these vulnerabilities, guys?
I didn't care about it before, but I asked GPT about it today, and its response was like๐คจ ๐ ๐ eskahun atakim?๐คข
I didn't care about it before, but I asked GPT about it today, and its response was like
Please open Telegram to view this post
VIEW IN TELEGRAM
๐3๐คฃ2
Please open Telegram to view this post
VIEW IN TELEGRAM
โค1
Me torturing my PC by trying to insert 20M database rows at this time of the night ๐ค
And I be like gena 80M ykeral๐
And I be like gena 80M ykeral
Please open Telegram to view this post
VIEW IN TELEGRAM
๐ญ5๐ฅ2
Code and Thought
20M
Doing the 50M now ๐บ
Please open Telegram to view this post
VIEW IN TELEGRAM
๐ฅ3
The 100M rows are inserted successfully๐บ
Please open Telegram to view this post
VIEW IN TELEGRAM
๐ฅ4
This media is not supported in your browser
VIEW IN TELEGRAM
ุฅูููู ุงูููููู ููู
ููุงุฆูููุชููู ููุตููููููู ุนูููู
ุงููููุจูููู ููุง ุฃููููููุง ุงูููุฐูููู ุขู ููููุง ุตูููููุง
ุนููููููู ููุณููููู ููุง ุชูุณููููู ูุง
ุงูููู ุตููู ูุณูู ุนูู ุณูุฏูุง ู ุญู ุฏ ูุนูู ุขูู ..๐๐
ุงููููุจูููู ููุง ุฃููููููุง ุงูููุฐูููู ุขู ููููุง ุตูููููุง
ุนููููููู ููุณููููู ููุง ุชูุณููููู ูุง
ุงูููู ุตููู ูุณูู ุนูู ุณูุฏูุง ู ุญู ุฏ ูุนูู ุขูู ..๐๐
โค4
FeteScript
Go to school every day, miss every dayโs class!!
My 2019 plan is to be strong like fetescript๐
Please open Telegram to view this post
VIEW IN TELEGRAM
๐ฅ4
Code and Thought
Who else thinks this is AI-generated? https://x.com/Tesla/status/2110913438293647789/video/1
Please open Telegram to view this post
VIEW IN TELEGRAM
๐3๐ญ2
Code and Thought
@codeandthought
Do you know the 80/20 rule?
Yeah, most of the 80% of things are in the hands of the 20%. Sometimes I feel like this narrows down to 98% or 99% versus 2% or 1%, like intelligence, creativity, and everything of this person; he is 1 in 8B.
Who do you think will be the next Elon Musk in our community?
@codeandthought
Yeah, most of the 80% of things are in the hands of the 20%. Sometimes I feel like this narrows down to 98% or 99% versus 2% or 1%, like intelligence, creativity, and everything of this person; he is 1 in 8B.
Who do you think will be the next Elon Musk in our community?
@codeandthought
๐3
Code and Thought
Soooooo I learned PostgreSQL yesterday and Instead of building another CRUD app, I decided to see what happens when I put 100 million rows into it. who wanna know the progress?๐บ resource โ> https://backend-mastery.seefun.dev/docs/data/postgresql @codeandthought
Imagine building an application that records everything users do. Someone signs in. Someone clicks a button. Someone completes a purchase. Someone opens a page. Each action produces an event.
For a small application, storing these events is relatively straightforward. But what happens when the application grows and accumulates millions of records?
Will searching become slower? Will the database consume too much storage? Can I still retrieve information quickly? What happens when I need to insert millions of new records?
Okay, I have documented every detail on how I built this in a way that not only you but also your high school graduate Grammy can understand. So, if you wanted to take a look, here is:
[Doc]
[github Repo]
@codeandthought
For a small application, storing these events is relatively straightforward. But what happens when the application grows and accumulates millions of records?
Will searching become slower? Will the database consume too much storage? Can I still retrieve information quickly? What happens when I need to insert millions of new records?
Okay, I have documented every detail on how I built this in a way that not only you but also your high school graduate Grammy can understand. So, if you wanted to take a look, here is:
[Doc]
[github Repo]
@codeandthought
Code and Thought
your high school graduate Grammy can understand.
So... when I was starting my programming journey, one of the most intimidating things was asking other developers for help or understanding them in general.
Everything sounded so technical, and sometimes I felt like I needed a certain level of experience just to have a conversation with them. And someone said โBe the senior you wished you had when you were a junior.โ
And that's why my notes are always so long, filled with examples, detailed explanations, and things that might seem too obvious or even silly to someone experienced.
But yeah... I know what it's like to be on the other side, trying to understand something everyone else seems to already know.๐ฅธ
@codeandthought
Everything sounded so technical, and sometimes I felt like I needed a certain level of experience just to have a conversation with them. And someone said โBe the senior you wished you had when you were a junior.โ
And that's why my notes are always so long, filled with examples, detailed explanations, and things that might seem too obvious or even silly to someone experienced.
But yeah... I know what it's like to be on the other side, trying to understand something everyone else seems to already know.
@codeandthought
Please open Telegram to view this post
VIEW IN TELEGRAM
โค1
Chapi Dev Talks
The 100M Row Reality Check (Community Challenge) Scaling isnโt a vibe; itโs pain you only feel when the data gets real. I challenge you to build a tiny product, then stuff its database with real-sized data: Start at 20M rows Push to 50M Aim for 100M Yourโฆ
If you want to understand PostgreSQL and Express, I really recommend taking on this challenge. I think it's more valuable than watching endless tutorials or building a bunch of mini projects.
But there's one thing I want to point out.
At the 100-million-row mark, my PostgreSQL database occupied approximately 20 GB of disk space. And Omarchy was particularly useful for this project because it gave me a Linux-native, terminal-focused development environment.
So, if you're using Windows or working with a PC that has limited free storage, you might face some challenges on the hardware side.
Just something to consider before jumping in.
But there's one thing I want to point out.
At the 100-million-row mark, my PostgreSQL database occupied approximately 20 GB of disk space. And Omarchy was particularly useful for this project because it gave me a Linux-native, terminal-focused development environment.
So, if you're using Windows or working with a PC that has limited free storage, you might face some challenges on the hardware side.
Just something to consider before jumping in.
โค2
Forwarded from Nahom's Sandbox
Omnispot is out: a 1-click mobile hotspot plugin for the Omarchy top bar.
Share your connection over Wi-Fi , monitor connected devices in real time, and toggle it straight from the bar.
Install:
GitHub: https://github.com/NWGKGIT/omnispot
Share your connection over Wi-Fi , monitor connected devices in real time, and toggle it straight from the bar.
Install:
omarchy plugin add https://github.com/NWGKGIT/omnispot.git --enable
GitHub: https://github.com/NWGKGIT/omnispot
โค1
Forwarded from DEVpoet ูุคูุฏ (Fuad.T)
๐6๐3๐ค2
I've built wealth without reading a book every day.
I've built wealth without making my bed every day.
I've built wealth without journaling every day.
I've built wealth without a 2 hour morning routine every day.
I've built wealth without giving up Netflix every day.
I've built wealth without waiting to marry.
I've built wealth without leverage.
Because the only things you have to do to build wealth are:
1) Find "stuff" that people want
2) Sell it to them for more than it costs you.
3) Do this many times.
There is no "hack" for it.
Alex Hormozi
I've built wealth without making my bed every day.
I've built wealth without journaling every day.
I've built wealth without a 2 hour morning routine every day.
I've built wealth without giving up Netflix every day.
I've built wealth without waiting to marry.
I've built wealth without leverage.
Because the only things you have to do to build wealth are:
1) Find "stuff" that people want
2) Sell it to them for more than it costs you.
3) Do this many times.
There is no "hack" for it.
Alex Hormozi
๐4