|
|
| NigelGomm 2006-02-09, 1:24 pm |
| I have a table with 3 fields, : one int and 2 binary memo fields.
the 2 memo fields hold a JPEG and ppt file for each record.
if i scan a test table with 33 records and copy the files out the sum total
of the file sizes is about 4.5mb.
But the fpt file is 7.6Mb (packed). That's more overhead than i was
expecting.
Any thoughts or suggestions?
tia
Nigel
| |
| Lee Mitchell 2006-02-09, 8:28 pm |
| Hi Nigel:
Do you need to store the images in a memo file? Could you simply store the
images on disk as PPT or JPG files and then point to the file using a path
stored in a Vchar or character field?
I hope this helps.
This posting is provided "AS IS" with no warranties, and confers no rights.
Sincerely,
Microsoft FoxPro Technical Support
Lee Mitchell
*-- VFP9 HAS ARRIVED!! --*
Read about all the new features of VFP9 here:
http://msdn.microsoft.com/vfoxpro/
*--Purchase VFP 9.0 here:
http://www.microsoft.com/PRODUCTS/i...cid=54787e64-52
69-4500-8bf2-3f06689f4ab3&type=ovr
Keep an eye on the product lifecycle for Visual FoxPro here:
http://support.microsoft.com/gp/lifeselectindex
- VFP5 Mainstream Support retired June 30th, 2003
- VFP6 Mainstream Support retired Sept. 30th, 2003
>I have a table with 3 fields, : one int and 2 binary memo fields.
>the 2 memo fields hold a JPEG and ppt file for each record.
>if i scan a test table with 33 records and copy the files out the sum
total
>of the file sizes is about 4.5mb.
>But the fpt file is 7.6Mb (packed). That's more overhead than i was
>expecting.
>Any thoughts or suggestions?
>tia
>Nigel
| |
| Rick Bean 2006-02-09, 8:28 pm |
| Nigel,
Consider changing the BLOCKSIZE (see SET BLOCKSIZE in help). You can use
SYS(2012) to check the current size. Remember that if you change the data in
these fields often, then you'll need to PACK MEMO on occassion otherwise the
..FPT will grow larger more quickly.
Rick
"NigelGomm" <rentman@newsgroup.nospam> wrote in message
news:uN$46IaLGHA.3856@TK2MSFTNGP12.phx.gbl...
>I have a table with 3 fields, : one int and 2 binary memo fields.
>
> the 2 memo fields hold a JPEG and ppt file for each record.
>
> if i scan a test table with 33 records and copy the files out the sum total of
> the file sizes is about 4.5mb.
>
> But the fpt file is 7.6Mb (packed). That's more overhead than i was expecting.
>
> Any thoughts or suggestions?
>
> tia
>
> Nigel
>
>
>
>
| |
| Cindy Winegarden 2006-02-10, 3:24 am |
| Just to add, the reason for this is because whenever you change a memo
field's contents FoxPro effectively deletes the old memo record and creates
a new one.
--
Cindy Winegarden MCSD, Microsoft Visual FoxPro MVP
cindy_winegarden@msn
.com www.cindywinegarden.com
"Rick Bean" < rgbean@unrealmelange
-inc.com> wrote in message
news:eYM6YCdLGHA.3260@TK2MSFTNGP11.phx.gbl...
> ..... if you change the data in these fields often, then you'll need to
> PACK MEMO on occassion otherwise the .FPT will grow larger more quickly.
| |
| Josh Assing 2006-02-10, 3:24 am |
| what you'll need to do is "pack memo" on a regular basis; perhaps when you shut
your app down.
What I tend to do is store a reference to the file vs. the file data; which
makes for a smaller memo file & less bloat
On Thu, 9 Feb 2006 12:57:03 -0500, "NigelGomm" <rentman@newsgroup.nospam> wrote:
>I have a table with 3 fields, : one int and 2 binary memo fields.
>
>the 2 memo fields hold a JPEG and ppt file for each record.
>
>if i scan a test table with 33 records and copy the files out the sum total
>of the file sizes is about 4.5mb.
>
>But the fpt file is 7.6Mb (packed). That's more overhead than i was
>expecting.
>
>Any thoughts or suggestions?
>
>tia
>
>Nigel
>
>
>
--- AntiSpam/harvest ---
Remove X's to send email to me.
| |
| NigelGomm 2006-02-10, 3:24 am |
| Lee,
I did think about doing it that way but went for the memo field instead for
2 reasons.
1. The next major iteration of this app will have the option to use SQL
server or MySQL as backend databases. The intention is that the
screens&business classes won't know the difference (that's the theory
anyway).
2. Performance. Users will often check for duplicates which i do by
comparing (and GROUP BY) a sys(2007) of the memo fields. Also I did some
testing and (IIRC) displaying images in a grid was faster using the
pictureval property from a memo field over the picture property and a file.
3. I don't want nosy users/admin people deleting the files outside of my
application.
thanks
Nigel
"Lee Mitchell" <Leemi@online.microsoft.com> wrote in message
news:Jy81cUcLGHA.768@TK2MSFTNGXA01.phx.gbl...
> Hi Nigel:
>
> Do you need to store the images in a memo file? Could you simply store
> the
> images on disk as PPT or JPG files and then point to the file using a path
> stored in a Vchar or character field?
>
> I hope this helps.
>
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>
> Sincerely,
> Microsoft FoxPro Technical Support
> Lee Mitchell
>
> *-- VFP9 HAS ARRIVED!! --*
> Read about all the new features of VFP9 here:
> http://msdn.microsoft.com/vfoxpro/
>
> *--Purchase VFP 9.0 here:
> http://www.microsoft.com/PRODUCTS/i...cid=54787e64-52
> 69-4500-8bf2-3f06689f4ab3&type=ovr
>
> Keep an eye on the product lifecycle for Visual FoxPro here:
> http://support.microsoft.com/gp/lifeselectindex
> - VFP5 Mainstream Support retired June 30th, 2003
> - VFP6 Mainstream Support retired Sept. 30th, 2003
>
>
>
> total
>
>
>
>
>
| |
| NigelGomm 2006-02-10, 3:24 am |
| Rick,
i just experimented with SET BLOCKSIZE using the same testdata and values of
0 and 33 saved me about 4k.
The data does change often so I attempt to pack the tables (if i can get
exclusive access - it's a multi-user app) on a couple of processes where
many records can get changed. I also distribute a 'Detect & Repair'
companion app that has a 'Pack' option. But that's not always enough so i
have the table vertically and horizontally partitioned (diagonally
partitioned ?) so it doesn't bust the 2GB limit.
but those numbers were on a test system with a packed table so there
shouldn't have been any excess.
thanks
Nigel
"Rick Bean" < rgbean@unrealmelange
-inc.com> wrote in message
news:eYM6YCdLGHA.3260@TK2MSFTNGP11.phx.gbl...
> Nigel,
> Consider changing the BLOCKSIZE (see SET BLOCKSIZE in help). You can use
> SYS(2012) to check the current size. Remember that if you change the data
> in these fields often, then you'll need to PACK MEMO on occassion
> otherwise the .FPT will grow larger more quickly.
>
> Rick
>
> "NigelGomm" <rentman@newsgroup.nospam> wrote in message
> news:uN$46IaLGHA.3856@TK2MSFTNGP12.phx.gbl...
>
| |
| NigelGomm 2006-02-10, 3:24 am |
| thanks Josh
see my replies to Lee & Rick
Nigel
"Josh Assing" <XjoshX@jAssing.com> wrote in message
news:fs1ou19es142icl
4nst9u4ol8aalat3ika@
4ax.com...
> what you'll need to do is "pack memo" on a regular basis; perhaps when you
> shut
> your app down.
>
> What I tend to do is store a reference to the file vs. the file data;
> which
> makes for a smaller memo file & less bloat
>
>
>
> On Thu, 9 Feb 2006 12:57:03 -0500, "NigelGomm" <rentman@newsgroup.nospam>
> wrote:
>
>
>
> --- AntiSpam/harvest ---
> Remove X's to send email to me.
| |
| Olaf Doschke 2006-02-13, 7:25 am |
| Hi Nigel,
sure you are using a binary memo (M nocptrans), not a
general or blob field?
If I add pics to a binary memo I get few overhead.
In a very simple test I added BMPs from the windows
folder to a dbf and only had few KB overhead (about
1-2 %).
Bye, Olaf.
| |
| NigelGomm 2006-02-13, 1:24 pm |
| hmm,
i tried with blob and didn't see a difference but i'll go back and check
now.
thanks Olaf
n
"Olaf Doschke" < T2xhZi5Eb3NjaGtlQFNl
dG1pY3MuZGU@strconv.14
< T2xhZi5Eb3NjaGtlQFNl
dG1pY3MuZGU@strconv.14> wrote in message
news:e0YbTZIMGHA.208@tk2msftngp13.phx.gbl...
> Hi Nigel,
>
> sure you are using a binary memo (M nocptrans), not a
> general or blob field?
>
> If I add pics to a binary memo I get few overhead.
> In a very simple test I added BMPs from the windows
> folder to a dbf and only had few KB overhead (about
> 1-2 %).
>
> Bye, Olaf.
>
| |
| Olaf Doschke 2006-02-14, 8:26 pm |
| > i tried with blob and didn't see a difference but i'll go back and check
> now.
Maybe blob is like binary memo in the respect of how much diskspace
is used.
I know with general fields there is much overhead stored (eg a thumbnail).
And I know with binary memo there is few overhead. And that just
comes from blocksize. setting blocksize different after the data is in the
memo won't help though. I think you are aware of that.
Bye, Olaf.
| |
| NigelGomm 2006-02-16, 9:24 am |
|
Olaf,
definitely not using General fields.....
The fields are binary memo. No difference when using blob fields. I set
blocksize and reimported after Rick's sugesstion and saved a few k but not
much.
Nigel
"Olaf Doschke" < T2xhZi5Eb3NjaGtlQFNl
dG1pY3MuZGU@strconv.14
< T2xhZi5Eb3NjaGtlQFNl
dG1pY3MuZGU@strconv.14> wrote in message
news:OXeU62bMGHA.1312@TK2MSFTNGP09.phx.gbl...
> Maybe blob is like binary memo in the respect of how much diskspace
> is used.
>
> I know with general fields there is much overhead stored (eg a thumbnail).
> And I know with binary memo there is few overhead. And that just
> comes from blocksize. setting blocksize different after the data is in the
> memo won't help though. I think you are aware of that.
>
> Bye, Olaf.
>
| |
| Olaf Doschke 2006-02-17, 7:27 am |
| Hi Nigel,
Your factor of about 1.7 FPT size to picture file size
must have it's reason.
So how do you insert the picture files?
I do
APPEND BLANK
APPEND MEMO mPictureMemo FROM cPictureFilename
in a loop through all pictures.
Bye, Olaf.
|
|
|
|