Gj’s SQL blog

April 19, 2009

how to speed up index on bytea, text, etc.

Filed under: index, postgresql — Grzegorz Jaskiewicz @ 5:43 pm

Well,

I recently had to create db to store some binary information. Now, these entries were to be unique in their category.

Average size of bytea field was to be 2400 bytes (about 2kb). Everything was fine, until table filled with 1.3M unique entries, and I was really astound how slow insertion become.

(more…)

on using different types in joins, and performance of it

Filed under: index, joins, postgresql — Grzegorz Jaskiewicz @ 4:44 pm

I get this question quite often from folks I work with, or people I join in their projects, usually with database designed by someone who is not very experienced in database world.

Most of them, don’t understand why the hell I am pressing for using bigint/int as a key to a table.

Here’s simple example, and my own theory behind it.

(more…)

Create a free website or blog at WordPress.com.