Jump to content
shacker

[Module]Delete Connections V3.0-Save Space On Database/optimize All Tables For More Speed-Ps1.2/1.7

Recommended Posts

This module increase your site speed deleting and optimizing the data in tables connections, connections_source, connections page, cart, etc. This module is usefull when you have a lot of visits and the size of these tables are too big.



To save space, you can use this module whitout any problem (your server can suspend your account if your database is too big in shared hostings).

07/03/11: Now optimizes all tables and delete the baskets of visitors to save space

31/10/11: Now deleted expired vouchers to save database space

v1.7 - better code and compatible PS 1.5 rc1

v2.1 - Clean smarty cache in DB  on PS 1.6

v2.2-optimized code, solved small bugs

v3.0-compatible ps 1.7

link

http://catalogo-onli...onnections.html



delete-connections.jpg

VISIT OUR WEBSITE FOR THE LATEST VERSION OF MODULES AND MORE FREE MODULE

www.catalogo-onlinersi.net


deleteconnections.zip V 1.0

 

deleteconnections.zip v2.0

 

 
deleteconnections.zip V2.2 (latest)

 

 

 

 

37907_lJmoRoURBhh1Aok5jhCq_t

Edited by shacker (see edit history)
  • Like 2

Share this post


Link to post
Share on other sites

Thanks for this usefull module

Could be nice to translate
Rows on connection table:
Rows on connection_page table:
Rows on connection_source table:

Just an idea: I suggest to create $this->tab = 'Webmaster'; to put modules used by webmaster only and separate than shop tools.

Share this post


Link to post
Share on other sites

Seems like what I've been looking for!

Quick question... is there ANY potential that deleting the data from these 3 tables could cause any problems with PS??

Thanks!

Share this post


Link to post
Share on other sites

NOp. This only is data to stats, so in the stats fot the source connection, etc, you dont see any data

Share this post


Link to post
Share on other sites

Thanks for the comments angore. For the slidecaptcha, you can addapt in any form of presta (only paste the code)
regards

Share this post


Link to post
Share on other sites

Hello shacker ;)

Thanks for this useful module.
Will checkout today the modified countdown module as i have been very busy last week and had no time to test it yet ;)

Thanks for all my friend.

Regards,

ysco..

Share this post


Link to post
Share on other sites

Hi ysco. Try to check my new captcha module. slide captcha. i check all in your server for the Countdown module

Share this post


Link to post
Share on other sites

Hello shacker .

Well i already had the SlideCaptcha module for 2 months as Razaro make this for my site ( thanks again razaro ).
But i can recommend everyone this module that you share for free shacker as this is a must have and better then the normal captcha.

Thanks for all the nice free modules that you share here on the forum.

Well let me know if you solved the problem with countdown module on my test server.

Best regards,

ysco..

Share this post


Link to post
Share on other sites

thanks for the comments. i test tonight in your server

Share this post


Link to post
Share on other sites

07/03/11: Now optimizes all tables and delete the baskets of visitors to save space

Share this post


Link to post
Share on other sites
Db::getInstance()->Execute("
DELETE FROM `"._DB_NAME_."`.`"._DB_PREFIX_."cart`
WHERE `"._DB_PREFIX_."cart`.`id_customer` = 0;");



.

Dammit, Shacker -- NO !
Blindly deleting cart records this way is wrong (and stupid!)

.
To understand the issue, go read the following:

http://www.prestashop.com/forums/viewthread/99057
/general_discussion/heads_up_deleting_carts_is_a_really_bad_idea_/
and
http://forge.prestashop.com/browse/PSCFI-1936
Cart::delete() fails to preserve db referential integrity

.

To date, "clean carts", by mnementhe64, is the ONLY module I've seen which safely performs cart deletion
http://www.prestashop.com/forums/viewthread/98826
[Free module] clean carts



Sorry, the ID_CUSTOMER = 0 means that have guest carts, that dont are linked to a real cart puttend on an order. And this carts you can deleted on back office with the delete button in CARTS

Share this post


Link to post
Share on other sites
I'm pissed because earlier in the thread i had applauded and "vouched for" the safety of this addon.

As a related issue, I'm compelled to mention again

quote:
angora -- 24 March 2011
http://www.prestashop.com/forums/viewthread/98714

FREE modules should be distributed via forum attachments, rather than from offsite locations.

Otherwise... shop owners face the risk of installing half-assed, and potentially vulnerable, third party modules which haven’t been subjected to peer review.


There is no difference between the module is in the forum or on my site, the vulnerabilities could be the same in both cases, and in both cases may be published updates.

Share this post


Link to post
Share on other sites

Again. Check the relation of the cart that can be deleted in back office, and check in your database andcorresponds with the id_customer =0.
I delete only this table, becouse this are the most bigger and have the most inutil data.
I use in all my sites and working, and please, moderate your language.

regards

Share this post


Link to post
Share on other sites

I review the module, but only upload in my site.
Thanks for the suggestions

Share this post


Link to post
Share on other sites

Thanks, i added your function to delete the data of guest carts in the module

Share this post


Link to post
Share on other sites

31/10/11: Now deleted expired vouchers to save database space

Share this post


Link to post
Share on other sites

MY ALL DATABASE WAS FUCKED UP DONT USE THIS FUCKING MODULE

First of all, dont use these language. Second, the module dont touch ALL YOUR DATABASE, so cant be delete any data or modify (exept connections table, old carts, etc) The module has downloaded 1000 times, if dont work or delete data, do you think that all users dont post here?

Please, think before post. You need to check a lot of things before says that the problem comes from a module, a theme. And if something is wrong, talk like adult and we help.

  • Like 3

Share this post


Link to post
Share on other sites

Used the module yesterday, and did it's job like it should! Brought down the database from 246 to 86mb :)

Thanks shacker!

Share this post


Link to post
Share on other sites

YOur welcome. This module works and is very tested for a lot of users. I use from presta 1.3 to 1.5 and never gime me a problem with data.

Share this post


Link to post
Share on other sites

I used it a moment before, my database reduce from 20 mb to 7,5 mb.

Thank you shacker !

Share this post


Link to post
Share on other sites

Hello shacker,

 

Thank you for this module!

 

I had one problem while using it. Although it seems that it is working correctly, when it finishes i get the following message at the end of the report:

 

 

"Above tables successfully optimized.: 0

Table 'test_system.ps_module' doesn't exist

 

SELECT `id_module` FROM `ps_module` WHERE `name` = 'deleteconnections' "

 

Is this normal?

 

Thank you in advance for the help.

 

Best regards,

Athanassios

Share this post


Link to post
Share on other sites

try download again in our site

 

 

Hello shacker,

 

Thank you for this module!

 

I had one problem while using it. Although it seems that it is working correctly, when it finishes i get the following message at the end of the report:

 

 

"Above tables successfully optimized.: 0

Table 'test_system.ps_module' doesn't exist

 

SELECT `id_module` FROM `ps_module` WHERE `name` = 'deleteconnections' "

 

Is this normal?

 

Thank you in advance for the help.

 

Best regards,

Athanassios

 

This is normal if you dont have the table ps_module. Check in your database if the connections table are empty

Share this post


Link to post
Share on other sites

Really useful plugin whom use prestashop since old times and mess the database...

 

I use it with the latest ps. 1.4.8.2 and it is workin' well!

 

Thanks again :)

Share this post


Link to post
Share on other sites

shacker: Great module - thanks! :)

But I got an error after click [delete all fields].:

 

Warning

: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /modules/deleteconnections/deleteconnections.php on line 190

 

ok.gif Rows before optimization on connection table (now is zero): 9922

 

ok.gif Rows before optimization on connection_page table (now is zero): 126079

 

ok.gif Rows before optimization on connection_page_source table (now is zero): 11219

 

ok.gif Rows before optimization on cart table (only cart for guests): 794

 

ok.gif Rows before optimization on vouchers table: 5

 

ok.gif Above tables successfully optimized.: 9922

 

ok.gif Fields deleted and tables optimized

 

Additionally, the module has not performed to optimize the tables.

OVH hosting.

 

edit: PS 1.4.4.1

Edited by waldemar [pl] (see edit history)

Share this post


Link to post
Share on other sites

i dont tested on 1.4.4.1, but in other 1.4 works.

Tjis is the line that optimize the tables

 

$opt_table = 'OPTIMIZE TABLE ' . $tbl_row[0];

 

---

maybe the module cant connect to your database.

I update the module to 1.8 version with other code.Please try again

Share this post


Link to post
Share on other sites

I just ran this on 1.4.3 as part of pre upgrade tidy up.

 

Db went from 320 mb > 63 mb

 

So far everything is looking pretty good. Site is running massively faster, gained huge amount of space.

 

Thanks!

Share this post


Link to post
Share on other sites

Thanks for the comments and for test our free module

 

regards

Share this post


Link to post
Share on other sites

yes, but always make a backyp of your database, if the server crashes when use modules to modify database, can be corrupt tables, but is not from the module

Share this post


Link to post
Share on other sites

Network Error (tcp_error)

A communication error occurred: "Operation timed out" The Web Server may be down, too busy, or experiencing other problems preventing it from responding to requests. You may wish to try again at a later time.

For assistance, contact your network support team.

 

what happened, did not work on me

I use prestashop 1.4.8.2

anyone can help

Share this post


Link to post
Share on other sites

this message is fro myour host, you need to contact them and increase the "set time out" configuration on php to zero

Share this post


Link to post
Share on other sites

this message is fro myour host, you need to contact them and increase the "set time out" configuration on php to zero

now I can, it takes time for this module finished running, thanks Edited by MGStore (see edit history)

Share this post


Link to post
Share on other sites

Hello,

 

so i have to only backup my database and not the webdirectory?

 

Thanx

 

Regards,

Share this post


Link to post
Share on other sites

Hello,

 

so i have to only backup my database and not the webdirectory?

 

Thanx

 

Regards,

yes, only database

 

module work with 1.5,3?

i tested on ps 1.5.2, , i need to test in 1.5.3

Share this post


Link to post
Share on other sites

Hello ,

it is possible to add some settings to BO? ( So we can have some control to deletions )

e.g

option to clean connections older than "specify date"

option to clean only visitors carts older than "specified date"

 

Or develop non free version of the module with similar settings!

 

Thank so much

 

Panagiotis

Edited by siomosp (see edit history)

Share this post


Link to post
Share on other sites

Hi Shacker,

 

I've just installed your module, I hope it could be useful to optimize a slow query problem on my SQL database.

 

Anyway, thank you.

 

Terzilio.

Share this post


Link to post
Share on other sites

I'd just like to say a big thank you for this. I'm trying to upgrade my shop from 1.2.5 to 1.5 and my database was too big (120Mb) to upload into my test system. It took literally one click and now my database is down to just 15Mb in size!

  • Like 1

Share this post


Link to post
Share on other sites

Shacker, your current module is aimed at reducing db data so that less rows will be pulled during a db query. Would you considering working on a module that optimizes the database query instead? Prestashop is notoriously famous to do many db queries. Minimizing the db query on page load would dramatically speed up website load time as less time is taken to query the database.

 

Let's aim to get the html file first load "waiting" time from 500ms to 50ms. This means any clicks to the store will result in near instant page load.

Edited by Pressed0024 (see edit history)

Share this post


Link to post
Share on other sites

Shacker, your current module is aimed at reducing db data so that less rows will be pulled during a db query. Would you considering working on a module that optimizes the database query instead? Prestashop is notoriously famous to do many db queries. Minimizing the db query on page load would dramatically speed up website load time as less time is taken to query the database.

 

Let's aim to get the html file first load "waiting" time from 500ms to 50ms. This means any clicks to the store will result in near instant page load.

pour le moment, mais le module permet également d'optimiser les tables pour de meilleures performances

Share this post


Link to post
Share on other sites

nobynator

 

is this confirmed?

 

What is about 1.5.4.1 ? At least if it does not work I 'd delete the content in the DB myself if I knew excactly how to. The table and its data is easy to find. But am I allowed to delete all entries just like that?

Share this post


Link to post
Share on other sites

Hello - 

 

Where can I find the English Version of this Module?  I do not see a link on this forum to the product.  I am very interested in the product and would appreciate a link to the product.  Any assistance you can provide would be greatly appreciated.  Thank you.


One additional note ----->  I am running Prestashop 1.5.6   Will this module work with this version of Prestashop?  Thank you.

Share this post


Link to post
Share on other sites

Hi

 

Do not plan on the ability to run script via cron?

Share this post


Link to post
Share on other sites

Hello Vekia,

Does module dboptimization.zip support PS 1.6 or maybe it's not needed for PS 1.6?
Is PS 1.6 own module "PrestaShop Cleaner" is enough or better to add more powerful module to get better speed?

Looking forward for your answer.

Kind regards.

Share this post


Link to post
Share on other sites

v2.0 - Compatible PS 1.6


I keep getting Error while extracting module (file may be corrupted). 

prestashop 1.4.6.2 

try again. 


Hello Vekia,

Does module dboptimization.zip support PS 1.6 or maybe it's not needed for PS 1.6?
Is PS 1.6 own module "PrestaShop Cleaner" is enough or better to add more powerful module to get better speed?

Looking forward for your answer.

Kind regards.

is not the same. this perform an optimization on databases too, and clear abandoned carts


Hi

 

Do not plan on the ability to run script via cron?

yeap, 


 

HI there,

 

Does your module support PS 1.6?

cheers.

 

now yes, just updated


Hello - 

 

Where can I find the English Version of this Module?  I do not see a link on this forum to the product.  I am very interested in the product and would appreciate a link to the product.  Any assistance you can provide would be greatly appreciated.  Thank you.


One additional note ----->  I am running Prestashop 1.5.6   Will this module work with this version of Prestashop?  Thank you.

download from our site the latest version

Share this post


Link to post
Share on other sites

The download link to the latest version does not work! 

 

Here is the error.

 

http://catalogo-onlinersi.net/?controller=404

try again the new link

Doesnt work for presta 1.5.5 :(

updated, now works

Hello ,

it is possible to add some settings to BO? ( So we can have some control to deletions )

e.g

option to clean connections older than "specify date"

option to clean only visitors carts older than "specified date"

 

Or develop non free version of the module with similar settings!

 

Thank so much

 

Panagiotis

hi. WE release the Presta Speed, that have more options

Hello,

 

so i have to only backup my database and not the webdirectory?

 

Thanx

 

Regards,

only db

Share this post


Link to post
Share on other sites

Hello Shacker,

 

Now i remember why this module was so useful, i just run it on my liver server and my BO is very responsive again.

For me a improvement off 50% after running the module because i had more then 160000 traces in my tables. My database was 3.82mb with gzip before the cleanup and now it is only 2.05mb gzipped after the cleanup so thanks for making this working for PS 1.6.x and sharing your wonderful modules.

 

Best regards,

 

ysco..

Share this post


Link to post
Share on other sites

I tried to load the module in PS1.6.0.8 but it does not show up in the module list.

I also tried to copy manually into the modules directory and I still do not see it in the module list.

is that strange?

 

Fixed.

Edited by nicola82 (see edit history)

Share this post


Link to post
Share on other sites

Hello -

 

Can you tell me what is the most current version of your module?  I am running Prestashop 1.5.6.2 and in my module list I show ver 1.2 of your module.  Is there a more current version, and if so, where can I download?   Thank you for your assistance.

Share this post


Link to post
Share on other sites

I've put the deleteconnections v1.5 on my PS 1.6.0.8 but when I click on "configure" it only shows the paypal logo on top.

What should I do?  :wacko:

Edited by nicola82 (see edit history)

Share this post


Link to post
Share on other sites

hello i installed this module on my Presta 1.6.0.9 but when i click configure i get

 

post-11513-0-19762600-1422899769_thumb.png

 

Is this normal ?

 

 

Share this post


Link to post
Share on other sites

Hi, Thanks for the module!

 

I downloaded version 1.7 directly from your page and it's working flawlessly on PS 1.6.0.11.

 

But not on 1.6.0.9

Edited by Egocefalo (see edit history)

Share this post


Link to post
Share on other sites

I just downloaded this module on my 1.6.0.9 site and it works perfectly.

 

I downloaded it from your website but the version was 1.7 not 2.0.....

 

Where can I get version 2.0???

 

Thanks

Edited by lateral (see edit history)

Share this post


Link to post
Share on other sites

Hi!

 

Thank you very much!

 

Best regards

MacRoy

Share this post


Link to post
Share on other sites

I just downloaded this module on my 1.6.0.9 site and it works perfectly.

 

I downloaded it from your website but the version was 1.7 not 2.0.....

 

Where can I get version 2.0???

 

Thanks

check in our site, 

Thnak you work great in PrestaShop™ 1.4.8.2  :D

thanks for the comments. rate the product in our site to support us

Share this post


Link to post
Share on other sites

I downloaded the zip file from your website but it is version 1.7...not version 2.0...

Share this post


Link to post
Share on other sites

Thank you very much for this awesome free module shaker !

 

Works fine using PrestaShop 1.6.0.6

 

Friendly

Share this post


Link to post
Share on other sites

Hello.

 

Making a new install with the module, there is now always an error :

 

 

Unknow error at line 106

[8192] mysql_connect(): The mysql extension is deprecated and will be removed in the future:
use mysqli or PDO instead

 

How to solve this trouble ?

 

Many thanks for this nice module.

Friendly

Share this post


Link to post
Share on other sites

Hi,

 

I just downloaded your module from your website and it says V2.1.0....not V2.2

 

Oh, and I also suggest that you change the phrase "Delete all fields" to "Delete all records".

 

Regards

Greg

Share this post


Link to post
Share on other sites

Hello shaker,

 

Thanks for this free awesome module.

Using v2.2 there is errors and if I want use the new version V2.2 I need to uncomment these lines about smarty_cache (from line 117 on deleteconnections.php) on PS 1.6.0.6

 

 

/**/
  /*if(_PS_VERSION_ > '1.6.0.10'){
   $sorgudcs = Db::getInstance(_PS_USE_SQL_SLAVE_)
                             ->executeS("SELECT * FROM `"._DB_PREFIX_."smarty_cache`");
                            
  if($sorgudcs === FALSE) {
   
  } else {
  $veridcs = $sorgudcs;
     @$totals = Db::getInstance(_PS_USE_SQL_SLAVE_)
                                ->NumRows($sorgudcs);
  Db::getInstance()->Execute('TRUNCATE TABLE `'._DB_PREFIX_.'smarty_cache`;');
  }
  }
  /**/

 

Friendly.

Share this post


Link to post
Share on other sites

thats strange. that code must run only ig PS version is > 1.6.0.10

Share this post


Link to post
Share on other sites

Not allowed to download, even if logged in. What's wrong?!?

Share this post


Link to post
Share on other sites

I confirm, the download for 2.2 version seems broken

Share this post


Link to post
Share on other sites

HI, thanks for your module.

I just installed the 2.1 version (2.2 not available), and made a clean.

It well worked for connections tables.

But fo the vouchers, When I check then in the back office, I have still expired vouchers displayed...

Any idea ?

Thx

Share this post


Link to post
Share on other sites

Hello Shacker, do you have live link for v2.2 here?

 

Best regards,

hi. use the 3.0 version

v3.0-compatible ps 1.7

Share this post


Link to post
Share on other sites