From Eigenpedia

Jump to: navigation, search


FAQ List

This page is the FAQ list for LucidDB users. For questions about the project, see the project FAQ on the website.

Startup Error for xlib xcb


I got an error similar to one of the ones below on startup. How do I fix it?

java: xcb_xlib.c:50: xcb_xlib_unlock: Assertion `c->xlib.lock' failed.
Locking assertion failure. Backtrace:
#0 /usr/lib/ [0xb7361767]
#1 /usr/lib/ [0xb73618b1]
#2 /usr/lib/ [0x99e591bd]
#3 /usr/lib/jvm/java-1.5.0-sun- [0x9b539dce]
#4 /usr/lib/jvm/java-1.5.0-sun- [0x9b523d77]
#5 /usr/lib/jvm/java-1.5.0-sun- [0x9b523ef3]
#6 /usr/lib/jvm/java-1.5.0-sun- [0x9b524136] 


The easiest way is to edit the bin/lucidDbServer startup script and add -Dorg.eigenbase.util.AWT_WORKAROUND=off to the Java command line. (This will be done as part of the out-of-the-box packaging in the next release since this seems to be a common problem.)

See this mailing list thread for more discussion.

Startup Error For libaio


I got the error below on startup. How do I fix it?

Loading database...
Exception in thread "main" org.eigenbase.util.EigenbaseException: Failed to load database
    at net.sf.farrago.resource.FarragoResource$_Def1.ex(
    at net.sf.farrago.db.FarragoDatabase.<init>(
    at net.sf.farrago.db.FarragoDbSingleton.pinReference(
    at net.sf.farrago.server.FarragoAbstractServer.start(
    at com.lucidera.farrago.LucidDbServer.main(
Caused by: org.eigenbase.util.EigenbaseException: FennelResource.en_US.libaioRequired()
    at net.sf.farrago.resource.FarragoResource$_Def0.ex(
    at net.sf.farrago.fennel.FennelDbHandle.handleNativeException(
    at net.sf.farrago.fennel.FennelDbHandle.executeCmd(
    at net.sf.farrago.fennel.FennelDbHandle.<init>(
    at net.sf.farrago.db.FarragoDatabase.loadFennel(
    at net.sf.farrago.db.FarragoDatabase.<init>(
    ... 3 more


On a Debian-based system such as Ubuntu:

apt-get install libaio

On A RedHat-based system:

yum install libaio

After that, you should be able to start the server. If you keep the default setting of aioLinux, you'll want to increase LucidDB's buffer pool size, and also preallocate data files, as mentioned in LucidDbPerformanceTuning#I.2FO_Scheduler.

Startup Error For mmap


I got the error below on startup, or when trying to increase the buffer pool size. How do I fix it?

Error: System call failed:  mmap failed: Cannot allocate memory (state=,code=0)


Assuming you actually have sufficient physical memory, and are using a 64-bit build if trying to allocate a large buffer pool, check these:

  1. Make sure ulimit -v returns the string "unlimited". Setting a quota on virtual memory size can cause the error above.
  2. Make sure you aren't accidentally using a debug build. Debug builds use mprotect to guard against buffer overruns, and this eats up a lot of additional memory and OS page table space.

Client Connectivity Problems


I can't get sqllineClient, Squirrel, and other clients to talk to the LucidDB server. What's wrong?


You may need to follow the instructions in ClientServerLocalhost to fix /etc/hosts.

Loading Large Data Files


I have a large data file in txt format. I need to bulk load it into Lucid tables. What's the best way to do this?


Create a flat file foreign table corresponding to your flat file, and then use an INSERT-SELECT statement to load from the flat file table to your target table.

See LucidDbFlatFileWrapper for details.

LucidDbEtlTutorial#Define_Sources also has an example that shows you how to create a flatfile foreign data wrapper, import it, and then access tables within the imported foreign schema.

ETL Tutorial


In attempting to follow the ETL Tutorial I got an error because directory examples/etl/filedata/ does not exist. What should I do?


Make sure you followed the instructions to start the server like this:


The tutorial relies on this for the relative paths to come out right. Otherwise, you need to edit the scripts so that they supply absolute paths.

Case-Sensitive Foreign Schema Name


I'm trying to import a foreign schema from a server like PostgreSQL with case-sensitive identifiers, and I'm not getting any tables back. How come?


Make sure you quote the foreign schema name in the IMPORT FOREIGN SCHEMA command:

import foreign schema "public"
from server postgres_abc
into ldb_schema 

Likewise for foreign tables.

Default Port


What is the default listening port number for LucidDB?


By default, LucidDB's RMI registry listens on port 5434. If you want to specify it explicitly from the client side, use a URL like


You can change a server's port number by setting system parameter serverRmiRegistryPort; see LucidDbSystemParameters for more information.

JDBC Driver Class


I'm trying to connect to LucidDB from my own program, but I always get an exception like java.lang.ClassNotFoundException: com.lucidera.jdbc.LucidDbRmiDriver. What should I do to fix it?


Make sure you have luciddb/plugin/LucidDbClient.jar on your program's classpath.


I'm trying to use LucidDbLocalDriver to access the server from a client program running on the same (local) machine, but it doesn't work. Why not?


The "local" driver is local only in the sense "in the same java process", not in the sense "on the same machine", so you'll need to use the RMI driver. Use driver class com.lucidera.jdbc.LucidDbRmiDriver unless the client and server are actually running in the same JVM.

Missing Columns


I created a wide table, and some of the columns seem to have gone AWOL. What gives?


If you're using sqlline, see this mailing list thread.

J2EE Embedding


How do I run LucidDB inside of a J2EE app server?


See LucidDbAsManagedBean.

Catalog File Locking


I got an exception about "Failed to lock catalog file" on server startup; what does this mean?


It means you already have a server process running from the same installation, and only one can be running at a time. See this mailing list thread. For information on how to start LucidDB on a remote server, see this thread.

Debug Builds


I built LucidDB from source and now it's really slow. How come?


By default, produces an unoptimized debug build, which is an order of magnitude slower than release builds. Be sure to specify the --with-optimization --without-debug flags to match the release configuration, unless you're actually planning to hack on LucidDB native code and use gdb.

Beyond Java


Can I use LucidDB in a non-Java application?



Compression Statistics


How can I tell how well compression is working?


It can be difficult to determine this from the size of db.dat, since not all of the pages may be currently in use.

To find out how many pages are currently in use across all tables, across all page versions, execute this:

alter system deallocate old;
select counter_value from sys_root.dba_performance_counters where counter_name='DatabasePagesAllocated';

Multiply the result by 32KB (the size of one page).

To study compression effectiveness for a particular table, execute this:

alter system deallocate old;
analyze table t estimate statistics for all columns;
select index_name, pages from sys_boot.mgmt.page_counts_view where table_schem='YOUR_SCHEMA_NAME' and table_name='YOUR_TABLE_NAME';

Indexes with names starting with "SYS$CLUSTERED" represent the compressed column storage. Every table has a single "SYS$DELETION_INDEX" which tracks deleted rows. A table may have SYS$ indexes corresponding to PRIMARY KEY and UNIQUE constraint defintions. Any other indexes are named indexes you have created.

OpenSUSE Performance


Why is LucidDB so slow for short queries on OpenSUSE?


See the discussion on the ext3 barrier setting in this thread, which contains a workaround.

Identifier Quoting


Why are the rules for this so confusing?


LucidDB strictly adheres to SQL:2003 in this regard. When you don't quote identifiers, they are implicitly uppercased as part of parsing (e.g. yoUr_table becomes YOUR_TABLE). When you quote them, case is preserved (e.g. "yoUr_table" stays exactly like that). You must quote them if they are reserved words or contain special characters. For compound identifiers, the quotes go around each component, e.g. "yoUr_schema"."yoUr_table" not "yoUr_schema.yoUr_table").

One point of confusion arises from the SET SCHEMA command. The actual syntax is SET SCHEMA <character-expression>, not SET SCHEMA <identifier>. So, you have to write

SET SCHEMA '"yoUr_schema"'


SET SCHEMA "yoUr_schema"

If you have a schema named EXTRACTION_SCHEMA (all upper case), this works:

SET SCHEMA 'extraction_schema'

The reason this works is that the single quotes are delimiting the character literal (not the identifier). The parsing for this expression first evaluates the character expression, then interprets the result as a (possibly-quoted) identifier. This allows you to do things like


So if user FRANCISCO logs in, he'll get SCHEMA_FOR_FRANCISCO set as default after executing the expression above.

Personal tools