F
F
furyon2015-09-14 16:54:15
PostgreSQL
furyon, 2015-09-14 16:54:15

A couple of questions about Postgres?

Hello!
I'm switching to postgres. There were several questions that I could not just google.
1. Single byte int. In the documentation, ints start from 2 bytes, I have a lot that would fit into 1.
2. Using an index with OR / IN. There is for example an index on the field "status". If I write "WHERE status IN (1,5)" or "WHERE status=1 OR status=5" will the index be used for each of the values? (It seems to be logical, but I could not find it in the documentation).

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey, 2015-09-14
@furyon

1. Single byte int. In the documentation, ints start from 2 bytes, I have a lot that would fit into 1.

on disk, it will take all the same 2 bytes, why save so much?
It's easier to see the query's exploit, isn't it?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question