Category: Database

Deleting in a loop in SQL Server

While discussing a way to delete many rows, but without deleting all of them at the same time (too much transaction logging), we came up with the following… This works pretty well. It’s faster to do it all at once,…

Rolling your own Grid Control with AQ

DBControl can do the same thing, but if you have more than one database on a server, this is where something like this will come in handy. PLSQL setup, you should only have to change the SHOWARD part… begin dbms_aqadm.grant_queue_privilege…

Hive performance parser

With data in the hiveserver2.log file, this awk scriptlet prints the timestamp, SQL, and seconds to run. There is an issue where the parser thread hands off to the executor, and you can’t always tie the two together.  However, at a…

How often does YARN purge locally cached resources?

If you are stretched for space locally, this may come in handy. By default, localized resources are purged every ten minutes… [root@cmhlddlkedat01 2.2.4.2-2]# grep -A1 yarn.nodemanager.localizer.cache.cleanup.interval-ms yarn-default.xml yarn.nodemanager.localizer.cache.cleanup.interval-ms 600000 [root@cmhlddlkedat01 2.2.4.2-2]# Of course, this can be overridden.

Phoenix to a secure HBase cluster

This is just a simple example of using a custom JDBC class to connect to an HBase cluster that is secured by kerberos. import java.sql.*; import java.util.*; public class phoenixTest { public static void main(String args[]) throws Exception { Connection…

Nastiness with Hive/ODBC

We ran into an issue that is not documented, although the hive user guide does indicate it should be set. Whenever we issued a statement with the Hive 64-bit ODBC driver through knox, the knox server would truncate anything after…