Re: Frage zu binären Daten im SQL 2005 speichern

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Guten Morgen Elmar,
vielen Dank für deine Antwort.
Hat mit sehr weitergeholfen.

gruss,
Ralf



"Elmar Boye" <ElmarB@xxxxxxx> schrieb im Newsbeitrag
news:5gcg85F3elku0U2@xxxxxxxxxxxxxxxxxxxxx

Hallo Ralf,

Ralf Christoff <Ralf-cc*nospam*@gmx.de> schrieb ...
ich möchte/muß Pdf's in einer SQL2005 DB speichern.
Benutzen tue ich dafür eine Spalte des Typs Image.

Da solltest Du eher varbinary(max) wählen.
Wegen des "möchte/muß" lies Dir mal durch:
http://research.microsoft.com/research/pubs/view.aspx?type=Technical%20Report&id=1089
"To BLOB or Not To BLOB: Large Object Storage in a Database or a
Filesystem?"

Das klappt auch inkl. das spätere auslesen einwandfrei.
Aber die Pdfs scheinen im SQL Server wesentlich mehr Platz als
auf Platte als File zu brauchen.
Wenn ich zB: 1000 Pdfs in einem Ordner habe, dann sind das
dort zusammen ca. 15 MB.
Wenn ich die Pdfs in eine leere Tabelle speichere, braucht diese dann
aber
55 MB. Also ca. 4 mal mehr Platz.

Woran liegt das? Ich dachte ich hätte es so verstanden, das der Typ Image
nur soviel Platz braucht wie er Daten drin speichern muss?

Nein. Zum einen musst Du erst einmal einige Zugabe für die Datenbank-
Verwaltung selbst rechnen. Vor allem aber sind BLOB Daten im SQL
Server in Blöcken organisiert, wie Du u. a.:
http://www.microsoft.com/technet/prodtechnol/sql/2000/reskit/part3/c1161.mspx?mfr=true
entnehmen kannst (gilt so auch für SQL Server 2005 mit varbinary(max).

Daraus kann sich u. U. einiges an Verschnitt ergeben.

Gruss
Elmar



.



Relevant Pages

  • Re: Frage zu binären Daten im SQL 2005 speichern
    ... "To BLOB or Not To BLOB: Large Object Storage in a Database or a Filesystem?" ... 1000 Pdfs in einem Ordner habe, ... Vor allem aber sind BLOB Daten im SQL ... Server in Blöcken organisiert, wie Du u. a.: ...
    (microsoft.public.de.german.entwickler.dotnet.datenbank)
  • Re: FTS and PDFs in row
    ... I really hoped that you could index a computed column in sql 2005. ... Looking for a FAQ on Indexing Services/SQL FTS ... I've read here and there that storing PDFs in row is frowned upon, ... but if putting PDFs on file system limits my ability to FTS, ...
    (microsoft.public.sqlserver.fulltext)
  • Re: Serving PDF files with SQL through firewall to ASP.Net
    ... expose PDF reports. ... I don't recommend putting BLOBs in the database but a link to the BLOB ... strings through a designated SQL port to ... > I want to be able to expose PDF files with the SQL Server that's on this ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: How to create the SPNEGO token used in CIFS/SMB authentication?
    ... redirector and server components call SSPI, ... get that hint blob on the server side by calling AcceptSecurityContext ... > Is there any Windows API available to generate SPNEGO tokens as the ...
    (microsoft.public.windows.server.security)
  • Re: How to create the SPNEGO token used in CIFS/SMB authentication?
    ... redirector and server components call SSPI, ... get that hint blob on the server side by calling AcceptSecurityContext ... > Is there any Windows API available to generate SPNEGO tokens as the ...
    (microsoft.public.platformsdk.security)