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. Oracle trick:

Postgresql equivalent is ctid, so you can try something like

SQLite demo:

  Also take a look at this old post on postgresql mailing list, if you incur in an older PostgreSQL version …

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":

The "BIN%" table are special temp tables of oracle. On PostgreSQL, try use PG_TABLES meta-table Happy sqlizing!