10-16-2013
Exporting 10 million records to a flat file and processing that is unlikely to be faster than just doing it in SQL, at least if the relevant columns are indexed. Have you checked your query with explain plan or similar to see if you can optimise it at all?
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi,
I have a file with 6 columns. First 3 columns together make unique record. I have a variable ($v) which hold a value that is obtained by a caliculaion. I have to replace value in 5th columnn with the value of the variable ($v). The value $v is caliculated from col4 and col6 values.
... (2 Replies)
Discussion started by: new_learner
2 Replies
2. Shell Programming and Scripting
i am reading an i/p file input.txt as below and want to read all filenames as in highlighted in bold below and put them in a different file output.txt. can someone help me with a shell script to do this? thanks in advance
regards
brad
input.txt
---------
START
TYPE:OPT
INIT_SEQ:01... (8 Replies)
Discussion started by: bradc
8 Replies
3. Shell Programming and Scripting
hello
please if anyone can help me make a shell script similar to the command HEAD and TAIL
THANKS (3 Replies)
Discussion started by: BELLA86
3 Replies
4. Shell Programming and Scripting
I have a text file in the following format. can any one please help me in printing the output in userfriendly format mentioned below.
Input.
1) /ss/abc/1/w/s/domainname/abc1/logname/
########error###################
########error###################
########error###################... (2 Replies)
Discussion started by: vinny81
2 Replies
5. Shell Programming and Scripting
file1
abcd
efgh
ijkl
mnop
file2
mnop
qrst
uvwx
xyza
file3
1234
4567 (8 Replies)
Discussion started by: rajivrsk
8 Replies
6. UNIX for Dummies Questions & Answers
Hi,
I have a file with the lines as below:
C_10_A05_T7
C_10_A06_SP6
C_10_B05_SP6
C_10_B05_T7
C_10_B01_SP6
C_10_B01_T7
C_12_G07_SP6
C_12_G11_SP6
C_12_G11_T7
C_2_H18_T7
C_2_I02_SP6
C_2_I02_T7
C_2_I13_SP6
C_2_I17_SP6
The four segments of each line are connected by '_' symbols. I... (7 Replies)
Discussion started by: Fahmida
7 Replies
7. Shell Programming and Scripting
hi all,
i want script to print the output in the following format
filename yyyy/mm/dd count
where count= no.of records in the file
Thanks in advance
hemanthsaikumar (11 Replies)
Discussion started by: hemanthsaikumar
11 Replies
8. Shell Programming and Scripting
I am trying to Join all the lines matching similar pattern.
Example ;
I wanted to join all the lines which has sam to a single line.
In next line, i wanted to have all the lines with jones to a single line....etc
> cat sample.txt
sam 2012/11/23
sam 2012/12/5
sam 2012/12/5
jones... (2 Replies)
Discussion started by: evrurs
2 Replies
9. Shell Programming and Scripting
Hello Mates,
I would request your help in a shell script,
simply I need to delete some matching db table records (rows) to ones in a given file:
------------------------------
#!/bin/bash
SQL="delete from numberlist where msidn='';"
MYSQL_USER="<your-user>"... (4 Replies)
Discussion started by: EAGL€
4 Replies
10. Shell Programming and Scripting
Not sure if this is the correct forum for this question. I have two files. file1.zip, file2
Input:
file1.zip
col1, col2 , col3
a , b , 0:0:0:0:0:c436:9346:d40b
x, y, 0:0:0:0:0:880:39f9:c9a7
m, n , 0:0:0:0:0:80c7:9161:fe00
file2.txt
col1
c4:36:93:46:d4:0b... (1 Reply)
Discussion started by: anil.v
1 Replies
LEARN ABOUT CENTOS
dbix::simple::comparison
DBIx::Simple::Comparison(3) User Contributed Perl Documentation DBIx::Simple::Comparison(3)
NAME
DBIx::Simple::Comparison - DBIx::Simple in DBI jargon
DESCRIPTION
This is just a simple and inaccurate overview of what DBI things the DBIx::Simple things represent, or the other way around.
This document can be useful to find the foo equivalent of bar.
"?" means that DBI doesn't have an equivalent or that I couldn't find one.
"=" means that DBIx::Simple provides a direct wrapper to the DBI function.
"~" means that DBIx::Simple's method does more or less the same, but usually in a more high level way: context sensitive, combining things,
automatically taking care of something.
Note that DBIx::Simple is a wrapper around DBI. It is not "better" than DBI. In fact, DBIx::Simple cannot work without DBI.
Using DBI directly is always faster than using DBIx::Simple's equivalents. (For the computer, that is. For you, DBIx::Simple is supposed to
be faster.)
Classes, common names
use DBI ~ use DBIx::Simple
$DBI::errstr = DBIx::Simple->error
DBI::db ~ DBIx::Simple
$dbh ~ $db
$dbh->errstr = $db->error
connect ~ connect
connect ~ new
DBI::st ~ DBIx::Simple::Result
<undef> ~ DBIx::Simple::Dummy
$sth ~ $result
Queries
DBI
my $sth = $dbh->prepare_cached($query);
$sth->execute(@values);
~ DBIx::Simple
my $result = $db->query($query, $values);
Results
DBI DBIx::Simple
bind_columns ~ bind
fetchrow_arrayref/fetch = fetch
fetchrow_array ~ list
*1 ~ flat
[@{fetchrow_arrayref}] = array
fetchall_arrayref ~ arrays
fetchrow_hashref() *2*3 = hash
fetchall_arrayref({}) *4 ~ hashes
fetchall_hashref *2 = map_hashes
? ? map_arrays
fetchall_hashref(1) *2 = map
$sth->{NAME_lc/NAME} = $result->columns
*1 There's no fetch variant, but you can do "{ @{ $dbh->selectcol_arrayref('SELECT ...', { Slice => [] }) } }".
*2 To receive the keys (column names) lowercased, use "$db->{FetchHashKeyName} = 'NAME_lc'". DBIx::Simple lower cases them by default.
*3 Or supply an argument, 'NAME_lc'.
*4 No, arrayref isn't a typo. When supplied an empty hash reference, DBI's fetchall_arrayref actually returns hashrefs. This DBI method
does not support lower casing of keys, DBIx::Simple does.
Direct access
DBI DBIx::Simple
$dbh = $db->dbh
$sth->{$foo} = $result->attr($foo)
func = func
begin_work = begin_work
commit = commit
rollback = rollback
last_insert_id = last_insert_id
rows = rows
disconnect ~ disconnect
finish ~ finish
DBIx::Simple specific (?)
keep_statements
lc_columns
iquery (via SQL::Interp)
select, insert, update, delete (via SQL::Abstract)
abstract (via SQL::Abstract)
flat
hashes
map_arrays
map
AUTHOR
Juerd Waalboer <juerd@cpan.org> <http://juerd.nl/>
SEE ALSO
DBI, DBIx::Simple
perl v5.16.3 2010-12-03 DBIx::Simple::Comparison(3)