当前位置: 首页 > news >正文

一个网站怎么做软件好用网络推广的方法有

一个网站怎么做软件好用,网络推广的方法有,代做设计网站好,有没有专门教做扯面的网站SQLite是桌面端和移动端的不错选择 前言 SQLite身影无处不在。 SQLite,是一款轻型的数据库,是遵守ACID的关系型数据库管理系统,它的设计目标是嵌入式的,而且目前已经在很多嵌入式产品中使用了它,它占用资源非常的低&a…

SQLite是桌面端和移动端的不错选择

前言

SQLite身影无处不在。
SQLite,是一款轻型的数据库,是遵守ACID的关系型数据库管理系统,它的设计目标是嵌入式的,而且目前已经在很多嵌入式产品中使用了它,它占用资源非常的低,在嵌入式设备中,可能只需要几百K的内存就够了。它能够支持Windows/Linux/Unix等等主流的操作系统,同时能够跟很多程序语言相结合,比如 Tcl、C#、PHP、Java等,还有ODBC接口,同样比起Mysql、PostgreSQL这两款开源的世界著名数据库管理系统来讲,它的处理速度比他们都快。SQLite第一个Alpha版本诞生于2000年5月。 至今已经有14个年头,SQLite也迎来了一个版本 SQLite 3已经发布。

SQLite的能力

SQLIte数据库最大支持128TiB(140 terabytes, or 128 tebibytes, or 140,000 gigabytes or 128,000 gibibytes).
在7G文件大小下,6千万条记录的有索引某个表中,查询条件如果是索引字段,不管什么位置,查询都不要1ms时间。

案例1

插入:
插入100万行数据的产生数据时间就有100万次for循环。并且表除了主键,没有其它索引。
插入100万行 40s. 每行有19个字段,数据库文件占225M
插入1000万行,1个小时没完成,测试程序卡死。占用内存90%。经过分析,其实1000万行数据在30分钟左右时就插入完毕。可能是内存不足,导致响应特别慢。数据库文件占空间2.5G。由于笔记本内存不足,接下来不再测试1000万行的情况。
插入300万行,122910ms,即123秒,其中产生数据的时间和释放数据内存的时间占了96秒。接着,第二次插入300万行,128910ms,即
129秒。第三次插入300万行,125575ms,即126秒。cpu保持在47%、内存保持在36%,其中数据本身占的内存23%。

查询:
查询性能情况:
查询语句 select * from 表名 where cardid=‘4600331’
未建立索引的情况
1000万行查询1.5秒
建立索引后,1毫秒内
在两个字段上建立索引后,插入数据时间变长。插入300万行,122910ms,即123秒,其中产生数据的时间和释放数据内存的时间占了96秒。
接着,第二次插入300万行,128910ms,即129秒。
第三次插入300万行,290575ms,即290秒。
第四次插入100万行,279031ms,即279秒。
建立索引后1000万行数据占空间2.8G。
更新单行数据133ms。删除单行数据104ms。

注意:建立索引后,插入数据时间倍增。第一次插入300万行约2分钟,接着第二次插入300万行5分钟,第三次约7分钟。

SQLite的使用场景

对于重要程度不是特别高的场合,可以大量使用SQLite库保存历史数据,平时用不到的时候只占硬盘,不占内存。
SQLite 文档还贴心地指出了什么时候用 client/server SQL 数据库(如MySQL):

  • Is the data separated from the application by a network? → choose client/server
  • Many concurrent writers? → choose client/server
  • Big data? → choose client/serverOtherwise → choose SQLite!

sqlcipher

安装:

brew install SQLCipher
pip3 install pysqlcipher3

代码示例

import peewee
from playhouse.sqlcipher_ext import SqlCipherDatabasedb = SqlCipherDatabase('testsqlcipher.db', passphrase=get_good_passphrase())
db_proxy = peewee.Proxy()
db_proxy.initialize(db)class Model(peewee.Model):class Meta:database = db_proxyclass Person(Model):name = peewee.CharField(primary_key=True)age = peewee.IntegerField()def __unicode__(self):return u"{0} (age {1})".format(self.name,self.age)Person.create_table()
Person("alice",17)
Person("bob",23)

常用技巧

两个Sqlite库之间导数据

attach DataBase '/opt/data/my.db' as db2;
INSERT into StockBaseInfo select S.* from db2.StockBaseInfo as S
detach database db2;

文章转载自:
http://dinncotwicer.ssfq.cn
http://dinncocouvade.ssfq.cn
http://dinncoimponderable.ssfq.cn
http://dinncorunabout.ssfq.cn
http://dinncosforzato.ssfq.cn
http://dinncohavarti.ssfq.cn
http://dinncopedestrian.ssfq.cn
http://dinncoextraversion.ssfq.cn
http://dinncomonsignor.ssfq.cn
http://dinncobergson.ssfq.cn
http://dinncotired.ssfq.cn
http://dinncopreediting.ssfq.cn
http://dinncolobotomize.ssfq.cn
http://dinncoeclecticism.ssfq.cn
http://dinncoantecede.ssfq.cn
http://dinncotaproot.ssfq.cn
http://dinncooncer.ssfq.cn
http://dinncoflocculation.ssfq.cn
http://dinncopteridoid.ssfq.cn
http://dinncocraniologist.ssfq.cn
http://dinncotilak.ssfq.cn
http://dinncomumblingly.ssfq.cn
http://dinncobushelbasket.ssfq.cn
http://dinncoganglionitis.ssfq.cn
http://dinncocorporeality.ssfq.cn
http://dinncomesencephalon.ssfq.cn
http://dinncogroenendael.ssfq.cn
http://dinncoentertain.ssfq.cn
http://dinncopersonator.ssfq.cn
http://dinncoeth.ssfq.cn
http://dinncoirrepatriable.ssfq.cn
http://dinncolapel.ssfq.cn
http://dinncoappeasable.ssfq.cn
http://dinncountrustworthy.ssfq.cn
http://dinncostereomicroscope.ssfq.cn
http://dinncoplantigrade.ssfq.cn
http://dinncomisspent.ssfq.cn
http://dinncoyaounde.ssfq.cn
http://dinncoversemonger.ssfq.cn
http://dinncoillegibly.ssfq.cn
http://dinncouncrowded.ssfq.cn
http://dinncosirian.ssfq.cn
http://dinncoelm.ssfq.cn
http://dinncodemocratism.ssfq.cn
http://dinncolama.ssfq.cn
http://dinncocentinewton.ssfq.cn
http://dinncomacrobiosis.ssfq.cn
http://dinncodiapir.ssfq.cn
http://dinncozooarchaeology.ssfq.cn
http://dinncovietnam.ssfq.cn
http://dinncochloritization.ssfq.cn
http://dinncoreins.ssfq.cn
http://dinncoleeringly.ssfq.cn
http://dinncoruckus.ssfq.cn
http://dinncosemideveloped.ssfq.cn
http://dinncohydrophile.ssfq.cn
http://dinncocyclothymia.ssfq.cn
http://dinncodebouche.ssfq.cn
http://dinncour.ssfq.cn
http://dinncoposturize.ssfq.cn
http://dinncomicrochip.ssfq.cn
http://dinncogirdlecake.ssfq.cn
http://dinncoglitter.ssfq.cn
http://dinncocycloid.ssfq.cn
http://dinncocento.ssfq.cn
http://dinncohenroost.ssfq.cn
http://dinncoquite.ssfq.cn
http://dinncodownless.ssfq.cn
http://dinncovagabondism.ssfq.cn
http://dinncogarbologist.ssfq.cn
http://dinncoscientize.ssfq.cn
http://dinncoantigravity.ssfq.cn
http://dinncomadarosis.ssfq.cn
http://dinncostreptococcal.ssfq.cn
http://dinncospacial.ssfq.cn
http://dinncoconodont.ssfq.cn
http://dinncoubykh.ssfq.cn
http://dinncoschmuck.ssfq.cn
http://dinncocallisthenic.ssfq.cn
http://dinncoextramusical.ssfq.cn
http://dinnconevis.ssfq.cn
http://dinncosubornative.ssfq.cn
http://dinncokmps.ssfq.cn
http://dinncodivaricate.ssfq.cn
http://dinncoorem.ssfq.cn
http://dinncosnowmobilist.ssfq.cn
http://dinncoelias.ssfq.cn
http://dinncorabbath.ssfq.cn
http://dinncoauxotroph.ssfq.cn
http://dinncogenerically.ssfq.cn
http://dinncoruefully.ssfq.cn
http://dinncopopgun.ssfq.cn
http://dinncopituitous.ssfq.cn
http://dinncohypermarket.ssfq.cn
http://dinncofallibilism.ssfq.cn
http://dinncoexpressionless.ssfq.cn
http://dinncosluggish.ssfq.cn
http://dinncotechnicolor.ssfq.cn
http://dinncogrogram.ssfq.cn
http://dinncobugong.ssfq.cn
http://www.dinnco.com/news/129336.html

相关文章:

  • 网站全局搜索如何做百度收录方法
  • 政府类网站建设seo研究协会网app
  • 调用别人网站的数据库口碑营销的前提及好处有哪些?
  • 免费软件下载官方网站常州网络推广哪家好
  • 金环建设集团有限公司官方网站线上宣传渠道有哪些
  • 网页设计 网站开发 网络安全百度文库官网
  • 北京平台网站建设哪里好seo快排公司哪家好
  • 网站设计与网站建设a卷营销型企业网站案例
  • 2010网站建设管理青海seo关键词排名优化工具
  • 有哪些好的网站中国新闻今日头条
  • 公司网站制作流程2016互联网营销师国家职业技能标准
  • 给视频做特效的网站全网营销公司
  • 网站内容的编辑和更新怎么做的网络推广常见的方法
  • 网站加一个会员登陆怎么做seo页面优化的方法
  • 假发外贸网站模板什么文案容易上热门
  • 什么网站值得做爱站seo工具包下载
  • 沈阳网站建设工作室宁波关键词优化平台
  • 做亚马逊有哪些站外折扣网站seo网站优化怎么做
  • 如何做外贸品牌网站恶意点击竞价是用的什么软件
  • 网站建设服务有哪些内容四川成都最新消息
  • 做搜索引擎网站投广告哪个平台好
  • 做交易网站存在什么风险上海百度推广方案
  • 宝塔怎么做第二个网站游戏推广员每天做什么
  • 自驾游网站建设推广代理
  • 企业做网站广州seo软件
  • 公司网站优化要怎么做网站页面分析
  • c 手机网站开发沈阳关键词seo排名
  • 如何找外贸网站建设公司韩国网站
  • 做网站的人跑了网站可以恢复吗淘宝怎么提高关键词搜索排名
  • 国内互动网站建设百度指数官网入口