Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8176381
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T23:09:05+00:00 2026-06-06T23:09:05+00:00

I am reading a ton of docs about Magento’s API, Magento’s Models and Direct

  • 0

I am reading a ton of docs about Magento’s API, Magento’s Models and Direct SQL calls. As I was reading that, the first conclusion is that direct sql calls would be very faster but I must take a special care at security, and the use of models make the development faster and easier but in the other hand, it loses performance manipulating huge catalogs.

I will have to deal with a shop with around 50k of products & heavy traffic, and I must export them to another server with category hierarchy, sku, description, image, product_name, url_path once and after it get only the updated ones once a hour. The best approach would be with direct sql calls, but will it be a suicide to make it with models? And do you think that integrate it with the SOAP API will be another suicide, and I should make it in a separate PHP to do this?

Super thanks in advance, I am very lost at this, and sorry for my bad English
Vinicius

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T23:09:08+00:00Added an answer on June 6, 2026 at 11:09 pm

    There are many considerations here. I’m speaking about this because I have a similar issue. I’m currently using SQL to get the data from magento store to xml. Truely, using sql can make it faster ONLY if you know the attributes you’re fetching. eg. if your products have 15 attibutes, that means 50k x 15 attributes using sql. But at least you’ll be free from version issues because you’re using sql statements.

    On the other hand…using models and API gives a lot of version issues especially if you’re developing for several magento versions. One other problem too is about magento custom attributes. Eg. If i add another attribute called ‘US SPECIAL SHIPPING’, It becomes quite difficult with the API.

    If you don’t mind…you just make a direct sql call to all your attributes and save them to xml. That means you need very very fast machine to do this.

    There is an extension on magento connect that serves comparison engines. It may fit your export neeeds. try it. price comparison script

    <?php 
    
    set_time_limit(3000);
    ini_set('memory_limit', '-1');
    include_once 'app/Mage.php';
    umask(0);
    Mage::app();
    $products = Mage::getModel('catalog/product')->getCollection();
    $products->addAttributeToSelect('*');
    $products->load(); 
    $baseUrl = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB);                       
        $output = '<?xml version="1.0" encoding="utf-8"?>
        <products>';
    if (count($products)): 
    
      foreach ($products as $id => $product):
    
      $url = $product->getProductUrl();
      $output .= '
      <product>
      <id>'. $product['entity_id'].'</id>
      <name><![CDATA['. $product['name'] .']]></name>
      <sku>'. $product['sku'] .'</sku>
      <description><![CDATA['. $product['description'] .']]></description>
      <shortdescription><![CDATA['. $product['short_description'] .']]></shortdescription>
      <price><![CDATA['. $product['price'] .']]></price>
      <minimalprice>'. $product['minimal_price'] .'</minimalprice>   
      <weight><![CDATA['. $product['weight'] .']]></weight>
      <categories><![CDATA['. $product['categories'] .']]></categories>
      <color><![CDATA['. $product['color'] .']]></color>
      <condition><![CDATA['. $product['condition'] .']]></condition>
      <availability><![CDATA['. $product['availability'] .']]></availability>
      <shipping><![CDATA['. $product['shipping'] .']]></shipping>
      <url><![CDATA['. $url.']]></url>
      <meta><![CDATA['. $product['meta_keyword'] .']]></meta>
      <metadescription><![CDATA['. $product['meta_description'] .']]></metadescription>
      <manufacturer><![CDATA['. $product['manufacturer'] .']]></manufacturer>
      <brand><![CDATA['. $product['brand'] .']]></brand>
      <upc><![CDATA['. $product['upc'] .']]></upc>
      <mpn><![CDATA['. $product['mpn'] .']]></mpn>
      <image><![CDATA['. $baseUrl ."media/catalog/product". $product['image'] .']]>        </image>';
      if (isset($attributes[$product['entity_id']])) {
      $output .= '
      <attributes>';  
      foreach ($attributes[$product['entity_id']] as $attribute => $values)
       $output .= '
        <attribute>
         <name>'. $attribute .'</name>
          <values>'.  join(', ', $values) . '</values>
         </attribute>';  
       $output .= '
     </attributes>';
      }
    
    $output .= '
    </product>';
    endforeach;
    endif;
    header ("Content-Type: text/xml; charset=ISO-8859-1");
    print $output .= '
     </products>'; 
    ?> 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been reading a ton about xml and learning a lot but I am
Before reading please note that I've googled this and read a ton of articles
After a ton of reading in books and on the web, I have noticed
Reading the docs, I'd expect $(#wrap2).remove(.error) to remove all .error elements from #wrap2 .
Reading manual about Sling http://sling.apache.org/site/46-line-blog.html added folder blog and blog.html to destination: \launchpad\content\src\main\resources\content\ but
Reading through this excellent article about safe construction techniques by Brain Goetz, I got
Reading about the Dispose pattern , I see the documentation repeatedly refer to cleaning
Reading some questions here on SO about conversion operators and constructors got me thinking
I'm reading some data like speed and curent location using a single ton class....I'm
I have been reading page after page after page about the benefits of using

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.