רשומות

מציג פוסטים מתאריך דצמבר, 2018

PostgreSQL #8- Tuning Part 2 - Indexes

תמונה
PostgreSQL #8- Tuning Part 2 - Indexes In the last post I described how we can gather data from the database to identify some performance issues. In this post I I will focus mostly on indexes. In this post I'm going to answer the next questions :  -What is an index ? -How does an index look like ? -How does index saved in disk ? -Why using an index is sometimes faster then reading the table directly ? -How the database decides whether to use an index or not ?  -What are seq_page_cost and random_page_cost? -What is an index only scan/ bitmap index scan ? -How can I force the database to use a specific scan ? -How to find tables that need an index ? As I already said in the previous posts, you dont need to be a professional Data engineer to understand what I'm talking about. I'm trying to write those posts in way that most of the people can understand so just try to read it :) So lets start :  So what is an index ? A lot of pe...