New answers tagged

0

Sort the data by uuid before loading it -- this will speed up the load and shrink the disk space some (because of less fragmentation) Use InnoDB -- this will speed up the SELECTs. Pack the uuids into BINARY(16) -- this will shrink the disk space by perhaps a factor of 2. If uuid_tags_codes is just tiny numbers, use TINYINT UNSIGNED -- 1 byte instead of 4. (...


0

You need to move the dump-file to an area where the database has access to it referenced inside the database as a directory object. You can run impdp from you local computer.


0

Assuming you are not using bigfile tablespaces and assuming you have no standard for how large datafiles should be or how empty they should be, you should create a tablespace with one 14G datafile and allow it to autoextend to a reasonable percentage of the overall free space you have available. If you have plenty of free space, you should set the maximum ...


2

Let's do some calculation: uuid: 36 bytes (Add 1 because it is varchar) ==> 37 uuid_tags_codes: 4 bytes When indexed, full length of uuid field: 100 bytes (37+4+100)bytes * 162,281,544 rows = 21.3 G So, 21G without adding the overhead! Therefore, your first problem is the space. To answer your questions: It is more than 6-8G. To ba safe you need ~...


3

You are doing a cartesian product here: ... FROM dbo.[DataSource], @ids i you need to know which address_id corresponds to which user, and for that you must have a clause. Something like this will do it: INSERT INTO dbo.[Users] ( first_name, surname , address_id ) SELECT first_name, surname, ...


2

From the symptoms, it seems that you are using InnoDB engine for your tables. If so, it is normal not to have accurate number of rows shown by clients (Like HeidiSQL or PHPMyAdmin). It is also worth it to mention that SHOW TABLE STATUS LIKE 'table_name' does not provide accurate row count for InnoDB tables. InnoDB estimates the number of rows in the ...


5

Without getting too involved in specific details on the language required to do this in Sybase SQL Anywhere 8, which is now more than 15 years old, I'd recommend something like the following: create a table on the laptop database that contains a column which uniquely identifies rows that have already been exported to the main database. the export function ...


1

It seems to me this case cannot be handle in the same way used in SQL Server. However, I found another alternative to do that (i.e., importing data based-on the number of character by each column) : LOAD DATA INFILE 'xx.txt' INTO TABLE MyTable LINES TERMINATED BY '\n' (@L) SET Field1 = SUBSTR(@L, 1, 3), -- field1 : Position = 1 ,length = 3 ...


1

I found that sqlite3 custom init script can have meta-command as well as SQL statement: #!/bin/sh commandfile=$(mktemp) # create temporary init script cat <<EOF > $commandfile .mode csv tablename .import /dev/stdin tablename EOF # import bzip2 -d -c huge_compressed.csv.bz2 | sqlite3 --init $commandfile dbname.db



Top 50 recent answers are included