on 11-23-2007 2:25 PM
Hello, i am testing my selects and joins with explains but the database tables have very few records now (only that i am inserting from the application to test it) and many times i see how "table scan" is selected where i am using conditions that only involve primary keys or indexed columns, can be this because of with so few records it is better to do a table scan? i should identify problems in my sql statements before put the app in production. Thanks.
Hi (again) Soraya,
you already nailed it.
MaxDB uses a cost-based optimizer approach.
So what counts is: how many pages are expected to be read to answer a specific query?
So if there are only a few records stored in a few pages, than index access would be the worse choice.
Therefore: performance testing should always be done on the same data, same system, same load etc. than the production system.
If possible, build up a QA system (like there's ususally one in SAP landscapes), that is just a copy of the production system.
Install your changed code there and check how the statements work.
If your happy with it - get some people (or agents if you've got a test software) to perform some business processes.
KR Lars
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
24 | |
11 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.