Total size of serialized data

This is a discussion on Total size of serialized data within the PHP Language forums, part of the PHP Programming Forums category; hi I need to calculate the size of serialized data in db for my quota operation.How can I find ...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 05-27-2007
gezerpunta
 
Posts: n/a
Default Total size of serialized data

hi
I need to calculate the size of serialized data in db for my quota
operation.How can I find it ?

Reply With Quote
  #2 (permalink)  
Old 05-27-2007
Edward Z. Yang
 
Posts: n/a
Default Re: Total size of serialized data

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

gezerpunta wrote:
> I need to calculate the size of serialized data in db for my quota
> operation.How can I find it ?


Assuming "size" = "disk space" and "serialized data" = "output of
serialize()" function and you already have serialized that data, use
LENGTH()
<http://dev.mysql.com/doc/refman/5.0/en/string-functions.html#function_length>

- --
Edward Z. Yang GnuPG: 0x869C48DA
HTML Purifier <htmlpurifier.org> Anti-XSS HTML Filter
[[ 3FA8 E9A9 7385 B691 A6FC B3CB A933 BE7D 869C 48DA ]]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGWdi2qTO+fYacSNoRArRUAJ9cZ3qTOrA8Zd9ZNyMkcC cMjva9UQCghVV6
LkWGhg8OQas6SclKKgbdwLs=
=iGau
-----END PGP SIGNATURE-----
Reply With Quote
  #3 (permalink)  
Old 05-27-2007
gezerpunta
 
Posts: n/a
Default Re: Total size of serialized data

my datas are binary files so I uses large object in postgresql.


On 27 Mayıs, 22:15, "Edward Z. Yang" <edwardzy...@thewritingpot.com>
wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> gezerpunta wrote:
> > I need to calculate the size of serialized data in db for my quota
> > operation.How can I find it ?

>
> Assuming "size" = "disk space" and "serialized data" = "output of
> serialize()" function and you already have serialized that data, use
> LENGTH()
> <http://dev.mysql.com/doc/refman/5.0/en/string-functions.html#function...>
>
> - --
> Edward Z. Yang GnuPG: 0x869C48DA
> HTML Purifier <htmlpurifier.org> Anti-XSS HTML Filter
> [[ 3FA8 E9A9 7385 B691 A6FC B3CB A933 BE7D 869C 48DA ]]
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (MingW32)
> Comment: Using GnuPG with Mozilla -http://enigmail.mozdev.org
>
> iD8DBQFGWdi2qTO+fYacSNoRArRUAJ9cZ3qTOrA8Zd9ZNyMkcC cMjva9UQCghVV6
> LkWGhg8OQas6SclKKgbdwLs=
> =iGau
> -----END PGP SIGNATURE-----



Reply With Quote
  #4 (permalink)  
Old 05-27-2007
Edward Z. Yang
 
Posts: n/a
Default Re: Total size of serialized data

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

gezerpunta wrote:
> my datas are binary files so I uses large object in postgresql.


octet_length()
<http://www.postgresql.org/docs/8.2/interactive/functions-binarystring.html>

Seriously, please RTFM.
- --
Edward Z. Yang GnuPG: 0x869C48DA
HTML Purifier <htmlpurifier.org> Anti-XSS HTML Filter
[[ 3FA8 E9A9 7385 B691 A6FC B3CB A933 BE7D 869C 48DA ]]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGWeUmqTO+fYacSNoRAin7AJ4qrnxXJteAt3ikNp3iz1 HXT4amZACfa4o7
5ENIt1T098k7hEK2/hxv41s=
=k3Ep
-----END PGP SIGNATURE-----
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 05:06 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0