title: django reduce query load time
body: <p>I using nginx as server.</p>
  
  <p>While loading the simple html page without any queries using Django , It takes only 34 milliseconds to load.</p>
  
  <pre><code>&lt;html&gt;&lt;body&gt;&lt;h1&gt; Test&lt;/h1&gt;&lt;/body&gt;&lt;/html&gt;
  </code></pre>
  
  <p>If run some queries ( having 500 rows in query) it take 4 seconds to load the page.</p>
  
  <p>views.py</p>
  
  <pre><code>def testing3(request):
          context = User.objects.all()
          return render_to_response('pages/index1.html',  {'users': context,})
  </code></pre>
  
  <p>index1.html</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt; &lt;title&gt;Testing  &lt;/title&gt;    &lt;/head&gt;
  &lt;body&gt;
  Testing
  &lt;h1&gt;Testing&lt;/h1&gt;
  {% for e in users %}
  &lt;table&gt;
          &lt;tr&gt; &lt;td class="active"&gt;{{ e.username }}&lt;/td&gt;
            &lt;td&gt;{{ e.email }}&lt;/td&gt;    &lt;/tr&gt;
  &lt;/table&gt;
          {% endfor %}
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>How to reduce the loading time.
  <img src="https://i.stack.imgur.com/MRAJn.png" alt="enter image description here"></p>
  
  <p>How to reduce this waiting time?</p>