# For DBAs and programmers:  Who writes the script to create an index?

**URL:** <https://boards.straightdope.com/t/for-dbas-and-programmers-who-writes-the-script-to-create-an-index/266003>\
**Category:** In My Humble Opinion\
**Created:** [September 25, 2004, 4:11am UTC](https://boards.straightdope.com/t/for-dbas-and-programmers-who-writes-the-script-to-create-an-index/266003 "2004-09-25T04:11:28Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Spectre\_of\_Pithecanthropus](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/spectre_of_pithecanthropus/32/12343_2.png) [@Spectre\_of\_Pithecanthropus](https://boards.straightdope.com/u/Spectre_of_Pithecanthropus)\
**Post date:** [September 25, 2004, 4:11am UTC](https://boards.straightdope.com/t/for-dbas-and-programmers-who-writes-the-script-to-create-an-index/266003/1 "2004-09-25T04:11:28Z")

</div>

Our DBA has been flaming me in emails because I didn’t give her a script to build a new index. I contend that it’s the DBA’s responsibility to know how to build the index, and more specifically, what the storage specification should be for that index. As a developer, I don’t have an easy way of determining what tablespaces (storage areas) can accommodate the index or cannot.

This particular altercation revolves around an index I wanted put on a 73 row table that has only one column. I think it’d be tantamount to an insult to tell the DBA how to build this.

What do you think?

---

<div class="post-metadata">

**Author:** ![Shodan](https://avatars.discourse-cdn.com/v4/letter/s/9f8e36/32.png) [@Shodan](https://boards.straightdope.com/u/Shodan)\
**Post date:** [September 25, 2004, 1:19pm UTC](https://boards.straightdope.com/t/for-dbas-and-programmers-who-writes-the-script-to-create-an-index/266003/2 "2004-09-25T13:19:16Z")

</div>

Maybe she doesn’t know how to do it.

Or (more likely, IMO) she wants you to do it for her, to save the effort.

DBA = Don’t Bother Asking.

Regards,  
Shodan

Flame away if you like. I was once a DBA.

---

<div class="post-metadata">

**Author:** ![ParentalAdvisory](https://avatars.discourse-cdn.com/v4/letter/p/53a042/32.png) [@ParentalAdvisory](https://boards.straightdope.com/u/ParentalAdvisory)\
**Post date:** [September 25, 2004, 1:29pm UTC](https://boards.straightdope.com/t/for-dbas-and-programmers-who-writes-the-script-to-create-an-index/266003/3 "2004-09-25T13:29:18Z")

</div>

Here at work, we have application DBA’s and system DBA’s. The application DBA’s manage the tables, and the system DBA’s manage the allocation of space and such. It’s really stupid how they have it segregated here, but hey, that’s how they do it. Maybe that’s your problem? If so, have a systems person look at it.

---

<div class="post-metadata">

**Author:** ![Spectre\_of\_Pithecanthropus](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/spectre_of_pithecanthropus/32/12343_2.png) [@Spectre\_of\_Pithecanthropus](https://boards.straightdope.com/u/Spectre_of_Pithecanthropus)\
**Post date:** [September 25, 2004, 3:24pm UTC](https://boards.straightdope.com/t/for-dbas-and-programmers-who-writes-the-script-to-create-an-index/266003/4 "2004-09-25T15:24:25Z")

</div>

AFter some minor raging, she did it. But the issue for me was not _how_ to do it, because it’s a total nobrainer. The problem is that I don’t have the tools to look at the tablespaces, nor the privileges to create an index on a production database.

---

<div class="post-metadata">

**Author:** ![ultrafilter](https://avatars.discourse-cdn.com/v4/letter/u/3d9bf3/32.png) [@ultrafilter](https://boards.straightdope.com/u/ultrafilter)\
**Post date:** [September 25, 2004, 3:59pm UTC](https://boards.straightdope.com/t/for-dbas-and-programmers-who-writes-the-script-to-create-an-index/266003/5 "2004-09-25T15:59:22Z")

</div>

That’s totally her responsibility.

---

<div class="post-metadata">

**Author:** ![mouthbreather](https://avatars.discourse-cdn.com/v4/letter/m/a698b9/32.png) [@mouthbreather](https://boards.straightdope.com/u/mouthbreather)\
**Post date:** [September 25, 2004, 9:18pm UTC](https://boards.straightdope.com/t/for-dbas-and-programmers-who-writes-the-script-to-create-an-index/266003/6 "2004-09-25T21:18:08Z")

</div>

Both developers and dbas do that at my work. I’m no help.

\>\>\>The problem is that I don’t have the tools to look at the tablespaces, nor the privileges to create an index on a production database.  
If the dba has these rights (can’t imagine they wouldn’t) while you don’t, then of course its his/her responsibility.

---

<div class="post-metadata">

**Author:** ![Padeye](https://avatars.discourse-cdn.com/v4/letter/p/a9a28c/32.png) [@Padeye](https://boards.straightdope.com/u/Padeye)\
**Post date:** [September 26, 2004, 5:25am UTC](https://boards.straightdope.com/t/for-dbas-and-programmers-who-writes-the-script-to-create-an-index/266003/7 "2004-09-26T05:25:35Z")

</div>

I hate to be the devil’s advocate but is a the performance difference between a full table scan compared to an index scan even significant? IN any event the DBA shoulod be involved for reasons mentioned above and to monitor query performance to make sure your index is actually being used as expected.

Storage, lol. I am so glad I moved from Oracle to Teradata. No more tablespaces, database files or reorganization. Allocating multiple terabytes of effectively contiguous space becomes trivial.

---

<div class="post-metadata">

**Author:** ![ultrafilter](https://avatars.discourse-cdn.com/v4/letter/u/3d9bf3/32.png) [@ultrafilter](https://boards.straightdope.com/u/ultrafilter)\
**Post date:** [September 26, 2004, 5:51am UTC](https://boards.straightdope.com/t/for-dbas-and-programmers-who-writes-the-script-to-create-an-index/266003/8 "2004-09-26T05:51:44Z")

</div>

> [@Padeye](#):
>
> I hate to be the devil’s advocate but is a the performance difference between a full table scan compared to an index scan even significant?

Maybe not here, but for some of the stuff I work with, it definitely makes a difference.
