On Column Sizes

If you just started your adventure with databases you may not pay too much attention do data types. Often reading in the data from a flat file will be so troublesome that you just define column types to be VARCHAR(100) just to have everything read in. Maybe after having the data read you convert some ...

Courses in Databases

I was preparing a post about what can slow down a query, but when I was reading a lot of different stuff online to make sure I am writing truth I encountered several interesting papers, and presentations that I think are worth reading. First of them is a series of presentations regarding Data Processing on ...

Know your database – a complex query

I have seen in my life many people learning SQL without prior understanding how databases work. But there are many crucial things that can make writing queries more fun, if it is not fun enough. Optimization in terms of memory use and execution is one of them. I would even say that is the most ...

In-Memory Bitmap Index in Postgres

I have written twice already that bitmap indexes are not implemented in Postgres. But somebody may as why then explain writes that it used Bitmap Index Scan? However, that is not on-disk index I wrote about. One of the most interesting analysis of performance I found is at Depesz.com, which is a blog of a Polish database ...

PGOpenCL – PostgreSQL and GPU

I wanted to play a bit with PostgreSQL and CUDA, but to make it work it would be worth to have both PostgreSQL and sample CUDA program compiled. There are many sources online about integrating PostgreSQL with CUDA, but most of them use outdated CUDA features and are copies one of another. Probably it is ...

B-tree or Bitmap

Recently I read a lot about databases, mostly theory but also from the design point of view. I have to admit that until recently I had no idea what a B-tree is. I mean beside that it is a kind of a data structure, but how it is build and why on average there is ...