Quote:
Originally Posted by
sonia102
I used :
"delete from tablename
where seq_id = 'seq2'
i deleted all the other sequences.
and after that
delete from tablename
where stop_id>=1000000 ;
i dont know how to reduce the original file size
its 300mb and i want to retain the first 100mb .
could some1 suggest?
---------- Post updated 02-26-13 at 07:59 PM ---------- Previous update was 02-25-13 at 09:54 PM ----------
hi
is there any command to count the number of bits in a file ?
Anything that i can use to retain the first 1000 or 100mb bits in a file and delte the remaining?
Count the bytes and multiply by 8.
Seriously - I'd propose you learn some basics on databases.
Deleting anything from the outside will corrupt the database rendering it totally unusable.
Deleting sequences does not really save space - they are just metadata worth a few bytes, counters that have a start and end value, and e.g. a step width, all recorded in the DB management structures.
Retaining the "first" 100 MB (= deleting 200 MB above) is pointless as consistent data are spread all over tablespaces/files.
Do as cero proposed - create a new datafile/tablespace, move all relevant data there, and then drop the old structures. Or, seriously consider recreating.