Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 10 of 12 total
Thread Compress SQL code
Wed, Dec 8 2010 6:45 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Before I start on a daft project I thought I'd ask your opinion (ie you lot using ElevateDB).

In a new app I've placed a script with all the code to create the database and its about 12200 lines of sql. It went through my brain - what this needs is compressing. As yet I don't know how I'd compress and decompress, what the impact on performance would be having to decompress before running.

Opinions, thoughts, comments?

Roy Lambert
Wed, Dec 8 2010 9:56 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Woops should have read about 1200 lines of sql not 12200

Roy Lambert
Wed, Dec 8 2010 11:31 AMPermanent Link

Malcolm Taylor

Roy Lambert wrote:

> Woops should have read about 1200 lines of sql not 12200
>
> Roy Lambert

Do that one more time and the 'problem' is solved.  Surprised

OT:  When did you last see your garden?  Mine is still deep below the
surface.  I have already dug a 22m track from car to kerb .. twice ..
and it needs digging yet again.  I think I'll just wait until summer.

--
Wed, Dec 8 2010 12:05 PMPermanent Link

Raul

Team Elevate Team Elevate

Hi Roy,

Why bother - the 1200 (or even 12000) is not that much data so its not worthwhile from space saving aspect IMHO. If you wish to reduce the size of the exe then using something like UPX (exe compressor) would help you without any work on your part (performance penalty from upx is practically non-existant at runtime).

SQL scripts tend to get modified often so my preference is to keep it in format that allows me to make quick changes to source without worrying about any other steps needed (like compressing the script and including it in exe as a resource - i do realize that step can be automated int compile/build process but you still need to then write code to unpack it runtime).  

If your script is stored external to exe then compressing might be useful for reducing file size - for emailing or downloading - as well as to ensure file integrity. I'd go for standard zip option here so its easy to decompress by user and there are number of libraries for delphi as well if you wish to do it inside your app.

Raul
Wed, Dec 8 2010 12:22 PMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Malcolm

>Do that one more time and the 'problem' is solved. Surprised

There are words for people like you, and helpful isn't one of them Smiley

>OT: When did you last see your garden? Mine is still deep below the
>surface. I have already dug a 22m track from car to kerb .. twice ..
>and it needs digging yet again. I think I'll just wait until summer.

About 2.5 weeks now, probably 14 inches of snow and I keep behind the gates clear (they come of their hinges otherwise as they ride up in the snow) and some bird feeding tracks for my wife (she feeds the birds seed, not for her to eat from!)

Took me 20 mins to get my car from the drive onto the road.

Roy Lambert.
Fri, Dec 10 2010 2:07 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Roy,

<< In a new app I've placed a script with all the code to create the
database and its about 12200 lines of sql. It went through my brain - what
this needs is compressing. As yet I don't know how I'd compress and
decompress, what the impact on performance would be having to decompress
before running. >>

Where are you storing the script ?

--
Tim Young
Elevate Software
www.elevatesoft.com
Sat, Dec 11 2010 4:56 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Tim


>Where are you storing the script ?

In a TEDBScript

Roy Lambert
Wed, Dec 15 2010 3:47 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Roy,

<< In a TEDBScript >>

So, you're compiling it directly into the .EXE as part of the form resource
?  In that case, I wouldn't worry about it - trying to compress/decompress
the TEDBScript.SQL property is going to be a real challenge.  Now, if you
stored the SQL in a separate file, table, etc., then that is easy to handle.
Smiley

--
Tim Young
Elevate Software
www.elevatesoft.com
Thu, Dec 16 2010 4:01 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Tim

>Now, if you
>stored the SQL in a separate file, table, etc., then that is easy to handle.
>Smiley

Ya don't say.

Roy Lambert

ps you have to imagine a broad Scots accent for the full effect.
Fri, Dec 17 2010 2:06 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Roy,

<< ps you have to imagine a broad Scots accent for the full effect. >>

That's how I always imagine you talking....isn't that correct ? Wink

--
Tim Young
Elevate Software
www.elevatesoft.com
Page 1 of 2Next Page »
Jump to Page:  1 2
Image