Encontrar

Artículo
· 22 dic, 2025 Lectura de 2 min

Índices: O Poder Silencioso por Trás de Consultas Rápidas

O Poder da Indexação em Tabelas de Banco de Dados

Ao trabalhar com bancos de dados, a maioria dos desenvolvedores entende o conceito de um índice e por que ele é usado: para acelerar a recuperação de dados. Mas o real impacto da indexação muitas vezes só fica claro quando comparamos cenários com e sem ela.

Você sabe o que acontece sem um índice?
Imagine uma tabela com três colunas: Name, Age, e MobileNumber.


Considere esta consulta:

Se a coluna Idade (Age) não tiver um índice, o motor do banco de dados irá:

  • Verificar se o campo da condição WHERE possui um índice.
  • Se não houver, ele fará uma varredura completa da tabela.
  • Para cada linha, ele verificará o valor da Idade e retornará as correspondências.

Isso significa que o motor atravessa toda a estrutura de dados, o que consome muito tempo em tabelas grandes.

O que acontece com um índice?

Agora, se a coluna Idade estiver indexada, o processo muda drasticamente:

  • O motor vai diretamente para a estrutura do índice.
  • Ele encontra o nó para Idade = 26.
  • O índice aponta para os IDs de registro correspondentes na tabela principal.
  • O resultado é obtido quase instantaneamente.

É por isso que a indexação é uma ferramenta de otimização tão poderosa.

Uma Lição da Vida Real
Recentemente, encontramos uma situação interessante que destacou a importância dos índices. Nossa tabela tinha 5 registros e a coluna Idade estava indexada. Então, por engano, excluímos duas entradas da estrutura do índice (não da tabela principal). Essas entradas correspondiam aos IDs X001 e X005, ambos com Idade = 26.


Quando executamos:
SELECT ID, Age, EmpId, Mobile, NameFROM Company.Employee WHERE Age = 26 

Esperávamos 3 registros (já que a tabela principal ainda os tinha), mas apenas 2 registros apareceram.

Por quê? Porque a consulta confiou no índice, e o índice estava incompleto.

Conclusão Principal
Os índices são poderosos, mas devem ser mantidos adequadamente. Se um índice for excluído acidentalmente ou corrompido, não se preocupe; você pode reconstruí-lo usando o comando abaixo:

Do ##Class(Company.Employee).%BuildIndices()

Moral da história: Índices tornam as consultas rápidas, mas também se tornam a "fonte única da verdade" para a recuperação. Manipule-os com cuidado! 😅

Comentarios (0)1
Inicie sesión o regístrese para continuar
Anuncio
· 22 dic, 2025

Season’s Greetings to the Developer Community

Dear Community,

As the 🎄 Festive Season 🎄 approaches, we’re excited to send our warmest wishes your way. May your holidays be filled with the joy of 🧑‍💻 learning, 🫂 connecting with fellow developers, and the thrill of new ideas and challenges waiting in the year ahead!

Looking back on 2025, we’re delighted to celebrate another year of remarkable achievements together with YOU, our incredible members:

✨ Developer Community celebrated the 10-Year Anniversary and continued to grow with thousands of new members and contributors!
✨ On Developer Community, we expanded our Developer Community AI capabilities and improved search
Open Exchange surpassed 1,100 applications, including new tools, frameworks, and integrations
✨ On Ideas Portal you suggested overall 600 incredible ideas and bug reports, with many now in progress or already implemented
Global Masters introduced new challenges, badges, and seasonal quests that kept engagement at an all-time high

A heartfelt THANK YOU to our brilliant members, and to our dedicated moderators and admins, for keeping this community vibrant, collaborative, and inspiring. Your passion and innovation continue to elevate the ecosystem every single day.

Here’s to more coding, learning, and connection in the year ahead. Wishing you a joyful holiday season and an innovative 2026! 🥳🎄✨

With gratitude,
The Developer Relations Team ❤️

Comentarios (0)1
Inicie sesión o regístrese para continuar
Resumen
· 22 dic, 2025

InterSystems Developers Publications, Week December 15 - 21, 2025, Digest

Articles
Announcements
Questions
Discussions
December 15 - 21, 2025Week at a GlanceInterSystems Developer Community
Artículo
· 22 dic, 2025 Lectura de 2 min

FHIR OAuth Highlight (2024.3+) - New Client QuickStart

Also in previous versions you could define your FHIR Server to accept requests via OAuth 2.0 (e.g. for a SMART on FHIR client) but nowadays with v2024.3, which was released a while ago, there is a new feature, that enables doing this more easily - the OAuth FHIR Client QuickStart.

This "QuickStart" is a Wizard-like "helper" that allows you to connect your FHIR server to an OAuth server and enable OAuth authentication and authorization for FHIR requests, within 5 simple steps (really just 3...).

  • Step 1 - Create or Choose FHIR Server

You might have already a FHIR Server (Endpoint) you defined, or you might have not defined one yet, and want to define one now, as part of this QuickStart.

  • Step 2 - Select FHIR Server

If you chose to 'Use an Existing' you will be shown available endpoints, per Namespace. For example:

If you chose to 'Create New' you'll be shown a small form to create a new endpoint:

This is similar to what you would see if you create the endpoint before hand by yourself:

  • Step 3 - Select OAuth Server Type

You can choose to use an external OAuth server (e.g. auth0 by Okta), or use the built-in OAuth Server within InterSystems IRIS.

If you want to use IRIS as your OAuth Server, you'll need to setup IRIS as an OAuth server, supporting FHIR, you have a "shortcut" for that as well, a method you can call that will set this up for you.

Note Secure Communication needs to be setup for this to work.

  • Step 4 - Configure OAuth Server

If you chose to use an external OAuth server, you will be prompted for it's Issuer Endpoint:

If you happened to have defined one already you can choose it from the dropdown, if not you can type (or paste) it in.

In any case you can test this OAuth server endpoint, for example:

  • Step 5 (or 4 if you chose the internal IRIS OAuth server) - Confirm

You'll see a short confirmation info and a 'Confirm' button.

For example (choosing to create a new FHIR Server, and using the IRIS internal OAuth server):

Or for example (choosing an existing FHIR endpoint, and an external OAuth server):

If all goes well you'll see a message this was created successfully.

If not, you'll get an appropriate message.

Behind the scenes you should be able to observe a few things -

  • You'll see the client defined under the OAuth clients (with it's details):

  • You'll see the client defined in your FHIR Endpoint:

  • In the general Security section of the Management Portal, under OAuth 2.0, you will also be able to find a Client Definition with a Client Configuration.

Assuming all the above is working you can start using OAuth (and specifically SMART on FHIR) to communicate with your FHIR Server.

More on that... in a future Article...

2 nuevos comentarios
Comentarios (2)2
Inicie sesión o regístrese para continuar
Resumen
· 22 dic, 2025