DevArt Bulk Data Insertion into an Oracle Database

There are some possibilities to bulk insert data. For my tests I inserted 1’500 rows containing some strings.

  • Use the Context: 50 seconds
  • Use ArrayBinding: 43 seconds
  • Use the OracleLoader class: 14 seconds

It seems that the OracleLoader is the fastes way to do this.



Oracle SQL Fast Retrieval of CLOBS

If a table contains CLOBS, depending on the method you use to connect, usually the CLOB-columns just return a handle that will trigger another connection/query to the database in order to retrieve the value. This makes it really slow. An easy way to speed it up is to retrieve everything which is small enough as string value. A string value however is limited to 4’000 characters. Thus you need to issue two queries:

The dbms_lob.substr part is there to avoid problems with multibyte characters and encodings.

Some database providers like provide properties like InitialLOBFetchSize that can be set to retrieve the data in-line as well. Devart on the other hand does not support any in-line loading of CLOB data.

Import local subversion repository to git

If you want to import a local subversion repository (maybe a dump) to git you can do this quite easily:

First you need to map the Subversion commit authors to Git commiters. For you just create a textfile author-mapping.txt:

And then you run the following commands:

Sometimes the protocol file:// cannot be handled. In that case you can run svnserve –daemon to serve your subversion repository locally. Then you can use svn://localhost/svnrepo instead.

Mangled Names on Synology Diskstation

From time to time I noticed strange filenames on the Synology Diskstation. Names like BGELMF~0. They always had a tilde. Those strange names are called mangled names. Samba has a feature to provide them to bad clients. Unfortunately this can also lead to “renaming” those files.

It is better to prevent this behavior altogether. To do this you need to connect over SSH to your diskstation and then you need to login as root.

Issue the following commands:

Now insert the following line in the section global:

Notice: this option could be reset after an update of the diskstation. If the bad filenames appear again, you should verify that the settings is still active.

Drupal PHP Fatal error Call to a member function getElementsByTagName()

I suddenly started getting the following error:

I checked what there is on line 1122. I could clearly see that the error needs to happen because $body_node was null. For a quick fix I just implemented a null check as follows:

This seems to resolve the problem for now.