Category Archives: Database

Indexing reference

Search engine indexing Inverted Index construction Index compression Variable-Byte Encoding Is Now Space-Efficient Too Partitioned Elias-Fano Indexes BitFunnel: Revisiting Signatures for Search The Case for Learned Index Structures Latent Semantic Indexing directed acyclic word graph Using Finite State Transducers in … Continue reading

Posted in Database | Leave a comment

Retrieve money data from PostgreSQL via ODBC API

The behaviour of money type in PostgreSQL is weird. SQLDescribeCol reports the type as SQL_FLOAT, ColumnSize is 7, but SQLGetData always get 0.0 if I am trying to use type SQL_C_FLOAT, SQL_C_DOUBLE or SQL_ARD_TYPE. At last I am able to … Continue reading

Posted in Database | Leave a comment

PostgreSQL

ODBC driver performance on large result-setsAccessing PostgreSQL in C/C++VC++ access PostgreSQL via ODBC Performance Tuning PostgreSQL install unixodbc-dev or libiodbc2-dev and iodbc via synapticUpdate /etc/odbcinst.ini [PostgreSQLW]Description        = PostgreSQL ODBC driverDriver        = /opt/PostgreSQL/psqlODBC/lib/psqlodbcw.soSetup        = /usr/lib/odbc/libodbcpsqlS.soUsageCount    = 1 [PostgreSQLA]Description   … Continue reading

Posted in Database | Leave a comment

Comparison of different SQL implementations

Comparison of different SQL implementations What are the limitations of MSDE?Compare SQL Server 2008 Edition Features Oracle Database 10g Express EditionLimitations of Oracle Database 10g Express Edition MS SQL is using filegroups. Tablespace is used by MySQL, PostgreSQL and Oracle. … Continue reading

Posted in Database | Leave a comment

Join sample on PostgreSQL

Here is a simple example that demonstrate usage of INNER, FULL, LEFT and RIGHT JOIN. Create 2 tablescreate table p1(pid integer, pname varchar(20));create table p2(pid integer, ptype varchar(10));insert some data into the tables.insert into p1(pid, pname) values(1,’p1′);insert into p1(pid, pname) … Continue reading

Posted in Database | Leave a comment

sqlite automatic commit and manual commit

Number of records inserted: 2008 OS: Windows XP SP2 SQLite 3.5.7 Machine: Compaq nc6230 By: Onega Commit Batch Size Duration (milliseconds) Automatic commit 242766 128 5469 256 2875 512 1703 1024 828 2048 422   Resource on DDJ:The SQLite Database … Continue reading

Posted in Database | Leave a comment

sqlite3 sample

There is a quick start in its official web site, but I think  another example(Embedding SQLite in a C program) is much better.

Posted in Database | Leave a comment