martedì 26 giugno 2012

Java - Problematic frame - C [libc.so.6+0x72f33] __libc_calloc+0x93

# An unexpected error has been detected by Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00002aaaab262f33, pid=5234, tid=1086544192
#
# Java VM: Java HotSpot(TM) 64-Bit Server VM (10.0-b19 mixed mode linux-amd64)
# Problematic frame:
# C  [libc.so.6+0x72f33]  __libc_calloc+0x93
#
# An error report file with more information is saved as:
# /mnt/bi/bisw/talend/KeyWord_2/Stg_Keyword_0.1/Stg_Keyword/hs_err_pid5234.log
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp



Soluzione: aggiungere questi parametri quando viene lanciato java

-Xms2048M -Xmx2048M -Dfile.encoding=UTF-8
-XX:+UseParallelGC
-XX:NewSize=512M
-XX:MaxNewSize=512M

venerdì 22 giugno 2012

MySql - Occupazione spazio nelle tabelle

SELECT
   table_schema,table_name, count(*) TABLES,
   round(sum(table_rows)/1000000,2) rows,
   round(sum(data_length)/(1024*1024*1024),2) DATA,
   round(sum(index_length)/(1024*1024*1024),2) idx, 
   round(sum(data_length+index_length)/(1024*1024*1024),2) total_size,
   round(sum(index_length)/sum(data_length),2) idxfrac
FROM
   information_schema.TABLES
group by table_schema,table_name
order by 7 desc

giovedì 21 giugno 2012

MySql - Salvataggio di tabella su file

Salvataggio di tabella su file:
SELECT * FROM prova
INTO OUTFILE '/mnt/prova.csv'
FIELDS TERMINATED BY ';' ENCLOSED BY '"' ESCAPED BY '\\' LINES TERMINATED BY '\n';

Se Infobright potrebbe dare il seguente errore:
The query includes syntax that is not supported by the Infobright Optimizer. Either restructure the query with supported syntax, or enable the MySQL Query Path in the brighthouse.ini file to execute the query with reduced performance. 

Per risolverlo eseguire prima lo statement:
set @bh_dataformat = 'txt_variable';

Caricamento da file:
LOAD DATA INFILE '/mnt/prova.csv' INTO TABLE prova1

martedì 12 giugno 2012

Vertica - Query di monitoraggio

Verificare lo spazio occupato dalla tabelle sul disco

SELECT t.table_schema,t.table_name AS table_name,
SUM(ps.wos_row_count + ps.ros_row_count) AS row_count,
SUM(ps.wos_used_bytes + ps.ros_used_bytes)/(1024*1024) AS MB_count
FROM tables t
JOIN projections p ON t.table_id = p.anchor_table_id
JOIN projection_storage ps on p.projection_name = ps.projection_name
WHERE (ps.wos_used_bytes + ps.ros_used_bytes) > 500000
GROUP BY t.table_schema,t.table_name
ORDER BY MB_count DESC;

Vedere l'elenco della tabelle
SELECT * FROM tables;

Verificare le query attive
select node_name, user_name, client_hostname, session_id, transaction_start, statement_start, current_statement
from sessions

Killare una sessione
Inserire come parametro il campo session_id
SELECT CLOSE_SESSION('vertica01.pgh.wpahs774:0x1db5bb');