<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.1" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Gravity Support Forums Topic: Consistent overhead added to database</title>
		<link>https://legacy.forums.gravityhelp.com/topic/consistent-overhead-added-to-database</link>
		<description>Gravity Support Forums Topic: Consistent overhead added to database</description>
		<language>en-US</language>
		<pubDate>Mon, 20 Apr 2026 01:00:13 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.1</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>https://legacy.forums.gravityhelp.com/search.php</link>
		</textInput>
		<atom:link href="https://legacy.forums.gravityhelp.com/rss/topic/consistent-overhead-added-to-database" rel="self" type="application/rss+xml" />

		<item>
			<title>JimBurke on "Consistent overhead added to database"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/consistent-overhead-added-to-database#post-51459</link>
			<pubDate>Tue, 06 Mar 2012 13:25:47 +0000</pubDate>
			<dc:creator>JimBurke</dc:creator>
			<guid isPermaLink="false">51459@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi,&#60;/p&#62;
&#60;p&#62;I'm interested in this too.&#60;/p&#62;
&#60;p&#62;In my app, I have no need for the entries or posts created by Gravity Forms. The reason is that I handle all the population &#38;amp; saving directly into a separate database, using hooks &#38;amp; filters.&#60;br /&#62;
Therefore, GF is creating posts &#38;amp; entries for which I have no need.&#60;/p&#62;
&#60;p&#62;Q1.  Can I delete everything in the rg_leads... tables ?&#60;br /&#62;
Q2. Can I switch it off altogether ?&#60;br /&#62;
Q3. Can I prevent GF from creating posts ?&#60;/p&#62;
&#60;p&#62;Many thanks,&#60;br /&#62;
Jim Burke
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Chris Hajer on "Consistent overhead added to database"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/consistent-overhead-added-to-database#post-46056</link>
			<pubDate>Tue, 10 Jan 2012 20:52:01 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">46056@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I don't think it will.  MySQL is pretty smart.  If you notice a performance issue, we're happy to take a look at it with you and see if we can make improvements.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>jacorre on "Consistent overhead added to database"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/consistent-overhead-added-to-database#post-46054</link>
			<pubDate>Tue, 10 Jan 2012 20:44:24 +0000</pubDate>
			<dc:creator>jacorre</dc:creator>
			<guid isPermaLink="false">46054@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I was researching something else but started to notice each time I submitted something with the form the overhead was increasing each time. So I was wondering if this would affect performance?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Chris Hajer on "Consistent overhead added to database"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/consistent-overhead-added-to-database#post-46045</link>
			<pubDate>Tue, 10 Jan 2012 19:35:08 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">46045@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;What caused you to look at this?  Were you having performance issues?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>jacorre on "Consistent overhead added to database"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/consistent-overhead-added-to-database#post-45756</link>
			<pubDate>Sat, 07 Jan 2012 01:13:09 +0000</pubDate>
			<dc:creator>jacorre</dc:creator>
			<guid isPermaLink="false">45756@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I'm noticing that there is overhead added to the lead and lead_detail tables upon each form submission. I'm only using one form right now. &#60;/p&#62;
&#60;p&#62;Because I'm filing to a custom post type, I don't want the form entries to be saved. So I am using the following function to delete them:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;function remove_form_entry($entry, $form){
    global $wpdb;

    $lead_id = $entry[&#38;#39;id&#38;#39;];
    $lead_table = RGFormsModel::get_lead_table_name();
    $lead_notes_table = RGFormsModel::get_lead_notes_table_name();
    $lead_detail_table = RGFormsModel::get_lead_details_table_name();
    $lead_detail_long_table = RGFormsModel::get_lead_details_long_table_name();

    //Delete from detail long
    $sql = $wpdb-&#38;gt;prepare(&#38;quot; DELETE FROM $lead_detail_long_table
                            WHERE lead_detail_id IN(
                                SELECT id FROM $lead_detail_table WHERE lead_id=%d
                            )&#38;quot;, $lead_id);
    $wpdb-&#38;gt;query($sql);

    //Delete from lead details
    $sql = $wpdb-&#38;gt;prepare(&#38;quot;DELETE FROM $lead_detail_table WHERE lead_id=%d&#38;quot;, $lead_id);
    $wpdb-&#38;gt;query($sql);

    //Delete from lead notes
    $sql = $wpdb-&#38;gt;prepare(&#38;quot;DELETE FROM $lead_notes_table WHERE lead_id=%d&#38;quot;, $lead_id);
    $wpdb-&#38;gt;query($sql);

    //Delete from lead
    $sql = $wpdb-&#38;gt;prepare(&#38;quot;DELETE FROM $lead_table WHERE id=%d&#38;quot;, $lead_id);
    $wpdb-&#38;gt;query($sql);

}
add_action(&#38;#39;gform_after_submission_1&#38;#39;, &#38;#39;remove_form_entry&#38;#39;, 10, 2);&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Does that have anything to do with it? How does this affect performance? I know optimization of the database tables is something that should be done as part of maintenance, but will I need to monitor this all the time especially if I notice lag time on the site?
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
