Database Indexing with PostgreSQL

Indexing is a way to improve reading performance, but it also makes writing performance worse, so consider using indexes in your application based on your use cases. To demonstrate, I will use an orders table with 10 million records: create table orders ( id serial primary key, total integer, -- unit: usd user_id integer, created_at date ); Then generate: total: random number in range (1 - 10k) user_id: random number in range (1 - 100k)
Read more →

Quickly build a svelte library with SvelteKit

In this post we are going to build a simple button as a svelte library within 15 minutes. Prerequisites: # Connect to GitHub with SSH Sign up an npm account Run this command to command to create the project: npm create svelte@latest svelte-button-example While the command running, choose the following answers: Which Svelte app template? > Library skeleton project Add type checking with TypeScript? > Yes, using TypeScript syntax For people who don’t want to use TypeScript or don’t want to build a TypeScript library, feel free to use the option above.
Read more →