postgresql

SQL: One of the most valuable skills – Craig Kerstiens

I admit it. I suffered from an “algebra narcoleptic syndrome” during my relational database lessons at University (1996 circa). Ok it is a fake. But it seems so real on these days. I was unable to avoid sleeping. I learned to love SQL after some years and now I think SQL is the most powerful, …

SQL: One of the most valuable skills – Craig Kerstiens Read More »

Removing duplicate rows in PostgreSQL, Oracle and SQLite

Sometimes you need to remove nasty duplicate on a table, based on a subset of the column. On every big database there is something called “rowid” which can be used to indentify a column in a unique way. On PostgreSQL is called ctid, as we shall see: Oracle way: DELETE FROM your_table WHERE rowid not …

Removing duplicate rows in PostgreSQL, Oracle and SQLite Read More »

Postgres performance tuning

After a bit of work, I have managed to optimize the performance of my Postgresql Server. I have spent a saturday morning digging around postgresql, using the fantastic komodo editor, and I am happy with the final solution. I followed¬† some suggestion on power PostgreSQL site, and now my postgres is blazing fast. For small …

Postgres performance tuning Read More »

oracle mass table drop

Sometimes I need to build a small script to delete a huge set of tables of a schema. In Oracle is easy to do it, using the meta tables "all_tables", "all_views", and "all_sequences": select  'drop table ' || table_name || ' cascade constraints;'    from all_tables where owner='protoss' and  table_name not like 'BIN%';select  'drop view …

oracle mass table drop Read More »