"Farzana" <[EMAIL PROTECTED]>
wrote in message news:[EMAIL PROTECTED]
> CREATE TABLE Brand_temp AS SELECT * FROM Brand WHERE 1=2
> insert into Brand_temp select * from brand order by branddescription
>
> Then we dropped the Brand table and renamed the temp table as brand
> like as follows:
> Drop table Brand
> ALTER table brand_temp RENAME TO Brand
>
> When we tried with the original Brand Table in the application it is
> taking around 15 minutes to fetch the record. But when we use the
> temp table it's taking 11 secs to fetch the record.

What statement do you use to "fetch the record"? Have you measured the 
time to retrieve the record that's located near the end of Brand table, 
as well as one near beginning? Have you tried running VACUUM on the 
original database, before all these manipulations (it could be that the 
table was badly fragmented, and you simply defragmented it; VACUUM would 
have, too)?

How large is Brand table - how many rows?
-- 
With best wishes,
    Igor Tandetnik

With sufficient thrust, pigs fly just fine. However, this is not 
necessarily a good idea. It is hard to be sure where they are going to 
land, and it could be dangerous sitting under them as they fly 
overhead. -- RFC 1925 



_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to