{"id":2325,"date":"2015-04-16T21:44:44","date_gmt":"2015-04-16T13:44:44","guid":{"rendered":"http:\/\/blog.qdac.cc\/?p=2325"},"modified":"2015-04-16T21:44:44","modified_gmt":"2015-04-16T13:44:44","slug":"qdb-postgresql-%e7%9b%b4%e6%8e%a5%e8%bf%9e%e6%8e%a5%e6%89%93%e5%bc%80%e6%95%b0%e6%8d%ae%e9%9b%86%e4%b8%8e-unidac-%e7%9a%84%e9%80%9f%e5%ba%a6%e5%af%b9%e6%af%94","status":"publish","type":"post","link":"https:\/\/blog.qdac.cc\/?p=2325","title":{"rendered":"[QDB] PostgreSQL \u76f4\u63a5\u8fde\u63a5\u6253\u5f00\u6570\u636e\u96c6\u4e0e UniDAC \u7684\u901f\u5ea6\u5bf9\u6bd4"},"content":{"rendered":"<p>\u3010\u6ce8\u3011\u672c\u5bf9\u6bd4\u53ea\u662f\u4e00\u4e2a\u4e2d\u95f4\u7ed3\u679c\uff0c\u4e0d\u4ee3\u8868\u6700\u7ec8\u7a33\u5b9a\u6d4b\u8bd5\u7248\u7ed3\u679c\u3002\u8fde\u63a5\u7684\u662f\u5b98\u7f51\u670d\u52a1\u5668\u4e0a\u7684\u6f14\u793a\u6570\u636e\u5e93\uff0c\u6d4b\u8bd5\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n<pre class=\"lang:delphi decode:true\">var\r\n  T1, T2: Int64;\r\n  I: Integer;\r\nbegin\r\nFProv.ServerHost := 'www.qdac.cc';\r\nFProv.ServerPort := \u7aef\u53e3\u53f7\u4e5f\u85cf\u6389;\r\nFProv.UserName := 'qdac';\r\nFProv.Password := '\u8fd9\u5757\u5bc6\u7801\u85cf\u6389\u4e86';\r\nFProv.Database := 'QDAC_Demo';\r\ntry\r\n  FProv.Open;\r\n  UniConnection1.Open;\r\n  T1 := GetTickCount;\r\n  FProv.OpenDataSet(FDataSet, 'select * from information_schema.tables'); \/\/\r\n  T1 := GetTickCount - T1;\r\n  T2 := GetTickCount;\r\n  UniQuery1.SQL.Text := 'select * from information_schema.tables';\r\n  UniQuery1.Open;\r\n  T2 := GetTickCount - T2;\r\n  if FDataSet.Active then\r\n    begin\r\n    Memo1.Lines.Add('\u6570\u636e\u96c6\u6253\u5f00\u6210\u529f\uff0c\u8fd4\u56de:' + IntToStr(FDataSet.RecordCount) + '\u6761\u8bb0\u5f55');\r\n    end;\r\n  Memo1.Lines.Add('QDAC:' + IntToStr(T1) + 'ms');\r\n  Memo1.Lines.Add('UniDAC:' + IntToStr(T2) + 'ms');\r\nfinally\r\n  for I := 0 to DBGrid1.Columns.Count - 1 do\r\n      DBGrid1.Columns[I].Width := 120;\r\n  if FProv.Connected then\r\n    begin\r\n    Memo1.Lines.Add('\u670d\u52a1\u5668\u5df2\u8fde\u63a5');\r\n    Memo1.Lines.AddStrings(FProv.Params);\r\n    end\r\n  else\r\n    Memo1.Lines.Add('\u670d\u52a1\u5668\u8fde\u63a5\u5931\u8d25:' + FProv.LastErrorMsg);\r\nend;<\/pre>\n<p>\u6700\u7ec8\u7684\u6d4b\u8bd5\u7ed3\u679c\u901f\u5ea6\u8981\u5feb\u4e8eUniDAC\uff0c\u4e0b\u9762\u662f\u5176\u4e2d\u4e00\u6b21\u7684\u6d4b\u8bd5\u7ed3\u679c\uff0c\u7ea6\u5feb\u4e00\u500d\u5de6\u53f3\u3002<\/p>\n<p><a href=\"https:\/\/blog.qdac.cc\/wp-content\/uploads\/2015\/04\/pqdirect_qdac_vs_unidac1.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-2327 size-full\" src=\"https:\/\/blog.qdac.cc\/wp-content\/uploads\/2015\/04\/pqdirect_qdac_vs_unidac1.jpg\" alt=\"\" width=\"670\" height=\"442\" srcset=\"https:\/\/blog.qdac.cc\/wp-content\/uploads\/2015\/04\/pqdirect_qdac_vs_unidac1.jpg 670w, https:\/\/blog.qdac.cc\/wp-content\/uploads\/2015\/04\/pqdirect_qdac_vs_unidac1-300x198.jpg 300w\" sizes=\"auto, (max-width: 670px) 100vw, 670px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3010\u6ce8\u3011\u672c\u5bf9\u6bd4\u53ea\u662f\u4e00\u4e2a\u4e2d\u95f4\u7ed3\u679c\uff0c\u4e0d\u4ee3\u8868\u6700\u7ec8 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[69,8,9,66,21],"tags":[391,392,230],"class_list":["post-2325","post","type-post","status-publish","format-standard","hentry","category-c-builder","category-delphi","category-qdac","category-qdb","category-misc","tag-postgresql","tag-392","tag-230"],"views":4028,"_links":{"self":[{"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=\/wp\/v2\/posts\/2325","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2325"}],"version-history":[{"count":1,"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=\/wp\/v2\/posts\/2325\/revisions"}],"predecessor-version":[{"id":2328,"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=\/wp\/v2\/posts\/2325\/revisions\/2328"}],"wp:attachment":[{"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2325"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2325"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.qdac.cc\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2325"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}